Class: ActivePresent::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/active_present/base.rb

Direct Known Subclasses

ApplicationPresenter

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#objectObject (readonly)

Returns the value of attribute object.



3
4
5
# File 'lib/active_present/base.rb', line 3

def object
  @object
end

#templateObject (readonly)

Returns the value of attribute template.



3
4
5
# File 'lib/active_present/base.rb', line 3

def template
  @template
end