Ruby Check si existe

apple = 1

defined?(apple)
# "local-variable"

defined?(bacon)
# nil
Hungry Hedgehog