Class: Marilyne::Presenter

Inherits:
Object
  • Object
show all
Defined in:
lib/marilyne/presenter.rb

Overview

Base presenter

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#objectObject (readonly)

Returns the value of attribute object.



5
6
7
# File 'lib/marilyne/presenter.rb', line 5

def object
  @object
end

#objectsObject (readonly)

Returns the value of attribute objects.



5
6
7
# File 'lib/marilyne/presenter.rb', line 5

def objects
  @objects
end

#templateObject (readonly)

Returns the value of attribute template.



5
6
7
# File 'lib/marilyne/presenter.rb', line 5

def template
  @template
end