Class: Marilyne::Presenter
- Inherits:
-
Object
- Object
- Marilyne::Presenter
- Defined in:
- lib/marilyne/presenter.rb
Overview
Base presenter
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#objects ⇒ Object
readonly
Returns the value of attribute objects.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(template, *objects) ⇒ Presenter
constructor
params: *
:template- Template where you frome *:objects- All presented objects.
Constructor Details
#initialize(template, *objects) ⇒ Presenter
params:
-
:template- Template where you frome -
:objects- All presented objects
10 11 12 13 |
# File 'lib/marilyne/presenter.rb', line 10 def initialize(template, *objects) @template = template objects.length == 1 ? @object = objects.first : @objects = objects end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
5 6 7 |
# File 'lib/marilyne/presenter.rb', line 5 def object @object end |
#objects ⇒ Object (readonly)
Returns the value of attribute objects.
5 6 7 |
# File 'lib/marilyne/presenter.rb', line 5 def objects @objects end |
#template ⇒ Object (readonly)
Returns the value of attribute template.
5 6 7 |
# File 'lib/marilyne/presenter.rb', line 5 def template @template end |