Class: Haberdasher::Decorator
- Inherits:
-
Object
- Object
- Haberdasher::Decorator
- Defined in:
- lib/haberdasher/decorator.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(model) ⇒ Decorator
constructor
A new instance of Decorator.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(model) ⇒ Decorator
Returns a new instance of Decorator.
5 6 7 |
# File 'lib/haberdasher/decorator.rb', line 5 def initialize model @model = model end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
9 10 11 |
# File 'lib/haberdasher/decorator.rb', line 9 def method_missing method, *args, &block model.send method, *args, &block end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
3 4 5 |
# File 'lib/haberdasher/decorator.rb', line 3 def model @model end |