Class: Slideck::Transformer Private
- Inherits:
-
Object
- Object
- Slideck::Transformer
- Defined in:
- lib/slideck/transformer.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Responsible for transforming file content into metadata and slides
Instance Method Summary collapse
-
#initialize(loader, parser, metadata_wrapper) ⇒ Transformer
constructor
Create a Transformer instance.
-
#read(filename) ⇒ Array<Slideck::Metadata, Array<Hash>>
Read metadata and slides from a file.
Constructor Details
#initialize(loader, parser, metadata_wrapper) ⇒ Transformer
Create a Transformer instance
21 22 23 24 25 |
# File 'lib/slideck/transformer.rb', line 21 def initialize(loader, parser, ) @loader = loader @parser = parser @metadata_wrapper = end |
Instance Method Details
#read(filename) ⇒ Array<Slideck::Metadata, Array<Hash>>
Read metadata and slides from a file
38 39 40 |
# File 'lib/slideck/transformer.rb', line 38 def read(filename) @metadata_wrapper.wrap(@parser.parse(@loader.load(filename))) end |