Class: Pres::Presenter
- Inherits:
-
Object
- Object
- Pres::Presenter
- Includes:
- Presents, ViewDelegation
- Defined in:
- lib/pres/presenter.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(object, view_context = nil, options = {}) ⇒ Presenter
constructor
A new instance of Presenter.
- #to_partial_path ⇒ Object
Methods included from ViewDelegation
#method_missing, #respond_to_missing?, #view_context
Constructor Details
#initialize(object, view_context = nil, options = {}) ⇒ Presenter
Returns a new instance of Presenter.
10 11 12 13 14 |
# File 'lib/pres/presenter.rb', line 10 def initialize(object, view_context = nil, = {}) @object = object @view_context = view_context = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Pres::ViewDelegation
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
8 9 10 |
# File 'lib/pres/presenter.rb', line 8 def object @object end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/pres/presenter.rb', line 8 def end |
Instance Method Details
#id ⇒ Object
16 17 18 |
# File 'lib/pres/presenter.rb', line 16 def id object.id end |
#to_partial_path ⇒ Object
20 21 22 |
# File 'lib/pres/presenter.rb', line 20 def to_partial_path object.to_partial_path end |