Class: SafeNil
- Includes:
- Singleton
- Defined in:
- lib/hobosupport/methodcall.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &b) ⇒ Object
34 35 36 37 |
# File 'lib/hobosupport/methodcall.rb', line 34 def method_missing(method, *args, &b) return nil unless nil.respond_to? method nil.send(method, *args, &b) rescue nil end |