Module: Deckorator::Delegator
- Extended by:
- ActiveSupport::Concern
- Included in:
- ApplicationDecorator
- Defined in:
- lib/deckorator/delegator.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
7 8 9 10 11 |
# File 'lib/deckorator/delegator.rb', line 7 def method_missing(method, *args, &block) decorated_object.respond_to?(method) ? decorated_object.send(method, *args, &block) : super end |
Instance Method Details
#to_param ⇒ Object
13 14 15 16 |
# File 'lib/deckorator/delegator.rb', line 13 def to_param decorated_object.respond_to?(:to_param) ? decorated_object.to_param : super end |