Class: LazyResource::ConfigurationDelegate
- Inherits:
-
Object
- Object
- LazyResource::ConfigurationDelegate
- Defined in:
- lib/lazy_resource/configuration_delegate.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/lazy_resource/configuration_delegate.rb', line 3 def method_missing(method_name, *args, &block) [LazyResource::Resource, LazyResource].each do |klass| if klass.respond_to?(method_name) return klass.send(method_name, *args, &block) end end # if we didn't return from the each above, the method wasn't found super end |