Module: Hashr::Delegate::Conditional
- Defined in:
- lib/hashr/delegate/conditional.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/hashr/delegate/conditional.rb', line 4 def method_missing(name, *args, &block) if (args.any? || block) && @data.respond_to?(name) @data.send(name, *args, &block) else super end end |