Class: ActivePresent::Base
- Inherits:
-
Object
- Object
- ActivePresent::Base
- Defined in:
- lib/active_present/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(object, template) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(object, template) ⇒ Base
Returns a new instance of Base.
5 6 7 8 |
# File 'lib/active_present/base.rb', line 5 def initialize(object, template) @object = object @template = template end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object (private)
17 18 19 |
# File 'lib/active_present/base.rb', line 17 def method_missing(*args, &block) template.send(*args, &block) end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
3 4 5 |
# File 'lib/active_present/base.rb', line 3 def object @object end |
#template ⇒ Object (readonly)
Returns the value of attribute template.
3 4 5 |
# File 'lib/active_present/base.rb', line 3 def template @template end |