Class: Revealize::FileSystemStore
- Inherits:
-
Object
- Object
- Revealize::FileSystemStore
- Defined in:
- lib/revealize/file_system_store.rb
Constant Summary collapse
- SLIDE_DECKS_DIR =
'slide_decks'
- SLIDES_DIR =
'slides'
- LAYOUTS_DIR =
'layouts'
Instance Attribute Summary collapse
-
#deck ⇒ Object
readonly
Returns the value of attribute deck.
-
#root_path ⇒ Object
readonly
Returns the value of attribute root_path.
Instance Method Summary collapse
- #decks ⇒ Object
-
#initialize(root_path, slide_deck = nil) ⇒ FileSystemStore
constructor
A new instance of FileSystemStore.
- #read_deck(deck_name) ⇒ Object
- #read_layout(layout_name) ⇒ Object
- #read_slide(slide_name) ⇒ Object
Constructor Details
#initialize(root_path, slide_deck = nil) ⇒ FileSystemStore
Returns a new instance of FileSystemStore.
22 23 24 25 |
# File 'lib/revealize/file_system_store.rb', line 22 def initialize(root_path, =nil) @root_path = root_path @deck = end |
Instance Attribute Details
#deck ⇒ Object (readonly)
Returns the value of attribute deck.
20 21 22 |
# File 'lib/revealize/file_system_store.rb', line 20 def deck @deck end |
#root_path ⇒ Object (readonly)
Returns the value of attribute root_path.
20 21 22 |
# File 'lib/revealize/file_system_store.rb', line 20 def root_path @root_path end |
Instance Method Details
#decks ⇒ Object
27 28 29 |
# File 'lib/revealize/file_system_store.rb', line 27 def decks DeckList.new *deck_names end |
#read_deck(deck_name) ⇒ Object
31 32 33 34 |
# File 'lib/revealize/file_system_store.rb', line 31 def read_deck(deck_name) SlideDeckDsl.new(self).instance_eval(deck_file(deck_name)) @deck end |
#read_layout(layout_name) ⇒ Object
36 37 38 |
# File 'lib/revealize/file_system_store.rb', line 36 def read_layout(layout_name) @deck = SlideDeck.new(DeckTemplate.new(layout_file(layout_name))) end |
#read_slide(slide_name) ⇒ Object
40 41 42 |
# File 'lib/revealize/file_system_store.rb', line 40 def () @deck.(()) end |