Class: Compendium::Presenters::Base
- Inherits:
-
Object
- Object
- Compendium::Presenters::Base
- Defined in:
- app/classes/compendium/presenters/base.rb
Instance Method Summary collapse
-
#initialize(template, object) ⇒ Base
constructor
A new instance of Base.
- #to_s ⇒ Object
Constructor Details
#initialize(template, object) ⇒ Base
Returns a new instance of Base.
3 4 5 6 |
# File 'app/classes/compendium/presenters/base.rb', line 3 def initialize(template, object) @object = object @template = template end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object (private)
20 21 22 23 |
# File 'app/classes/compendium/presenters/base.rb', line 20 def method_missing(*args, &block) return @template.send(*args, &block) if @template.respond_to?(args.first) super end |
Instance Method Details
#to_s ⇒ Object
8 9 10 |
# File 'app/classes/compendium/presenters/base.rb', line 8 def to_s "#<#{self.class.name}:0x00#{'%x' % (object_id << 1)}>" end |