Class: ApplicationDecorator
- Inherits:
-
Object
- Object
- ApplicationDecorator
- Includes:
- Deckorator::Delegator, Deckorator::Undecorator
- Defined in:
- lib/generators/deckorator/install/templates/application_decorator.rb
Instance Attribute Summary collapse
-
#decorated_object ⇒ Object
Returns the value of attribute decorated_object.
Instance Method Summary collapse
-
#initialize(object) ⇒ ApplicationDecorator
constructor
A new instance of ApplicationDecorator.
Methods included from Deckorator::Undecorator
Methods included from Deckorator::Delegator
Constructor Details
#initialize(object) ⇒ ApplicationDecorator
Returns a new instance of ApplicationDecorator.
8 9 10 11 |
# File 'lib/generators/deckorator/install/templates/application_decorator.rb', line 8 def initialize(object) @decorated_object = object self.class.decorated_object_class = object.class end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Deckorator::Delegator
Instance Attribute Details
#decorated_object ⇒ Object
Returns the value of attribute decorated_object.
5 6 7 |
# File 'lib/generators/deckorator/install/templates/application_decorator.rb', line 5 def decorated_object @decorated_object end |