Class: Hash
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
2 3 4 5 6 |
# File 'lib/squealer/hash.rb', line 2 def method_missing(name, *args, &block) super if args.size > 0 || block_given? #TODO: Warn if key doesn't exist - it's probably a typo in their squealer script self[name.to_s] end |