Class: NilClass
- Inherits:
-
Object
- Object
- NilClass
- Defined in:
- lib/nash.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/nash.rb', line 2 def method_missing(method, *args) if method == :[] raise NoMethodError.new("undefined method `[]' for nil:NilClass, with argument #{args.first.inspect}") else super end end |