Class: Revealize::SlideDeck
- Inherits:
-
Object
- Object
- Revealize::SlideDeck
- Defined in:
- lib/revealize/slide_deck.rb
Instance Attribute Summary collapse
-
#slides ⇒ Object
readonly
Returns the value of attribute slides.
Instance Method Summary collapse
- #add_slide(renderable) ⇒ Object
-
#initialize(template) ⇒ SlideDeck
constructor
A new instance of SlideDeck.
- #render ⇒ Object
- #render_slides ⇒ Object
Constructor Details
#initialize(template) ⇒ SlideDeck
Returns a new instance of SlideDeck.
6 7 8 9 |
# File 'lib/revealize/slide_deck.rb', line 6 def initialize(template) @slides = [] @template = template end |
Instance Attribute Details
#slides ⇒ Object (readonly)
Returns the value of attribute slides.
5 6 7 |
# File 'lib/revealize/slide_deck.rb', line 5 def @slides end |
Instance Method Details
#add_slide(renderable) ⇒ Object
11 12 13 |
# File 'lib/revealize/slide_deck.rb', line 11 def (renderable) @slides << renderable end |
#render ⇒ Object
15 16 17 |
# File 'lib/revealize/slide_deck.rb', line 15 def render @template.render(self) end |
#render_slides ⇒ Object
19 20 21 |
# File 'lib/revealize/slide_deck.rb', line 19 def @slides.map { || .render }.join() end |