Ruby überprüfen, ob existiert
apple = 1
defined?(apple)
# "local-variable"
defined?(bacon)
# nil
Hungry Hedgehog
apple = 1
defined?(apple)
# "local-variable"
defined?(bacon)
# nil