Class: Slideck::Loader Private
- Inherits:
-
Object
- Object
- Slideck::Loader
- Defined in:
- lib/slideck/loader.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 loading slides
Instance Method Summary collapse
-
#initialize(read_handler) ⇒ Loader
constructor
Create a Loader instance.
-
#load(location) ⇒ String
Load slides from a location.
Constructor Details
#initialize(read_handler) ⇒ Loader
Create a Loader instance
17 18 19 |
# File 'lib/slideck/loader.rb', line 17 def initialize(read_handler) @read_handler = read_handler end |
Instance Method Details
#load(location) ⇒ String
Load slides from a location
35 36 37 38 39 40 41 42 43 |
# File 'lib/slideck/loader.rb', line 35 def load(location) if location.nil? raise ReadError, "the location for the slides must be given" end @read_handler.read(location) rescue SystemCallError => err raise ReadError, err. end |