Class: Twigg::Decorator
- Inherits:
- BasicObject
- Defined in:
- lib/twigg/decorator.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(decorated) ⇒ Decorator
constructor
A new instance of Decorator.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(decorated) ⇒ Decorator
Returns a new instance of Decorator.
3 4 5 |
# File 'lib/twigg/decorator.rb', line 3 def initialize(decorated) @decorated = decorated end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
7 8 9 |
# File 'lib/twigg/decorator.rb', line 7 def method_missing(method, *args, &block) @decorated.send(method, *args, &block) end |