Class: Lecture::Runner
- Inherits:
-
Object
- Object
- Lecture::Runner
- Includes:
- Terminal
- Defined in:
- lib/lecture/runner.rb
Instance Attribute Summary collapse
-
#current_slide ⇒ Object
Returns the value of attribute current_slide.
-
#deck ⇒ Object
Returns the value of attribute deck.
-
#slides ⇒ Object
Returns the value of attribute slides.
Instance Method Summary collapse
- #configure {|Config.new| ... } ⇒ Object
- #execute ⇒ Object
-
#initialize(deck) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(deck) ⇒ Runner
Returns a new instance of Runner.
18 19 20 21 22 |
# File 'lib/lecture/runner.rb', line 18 def initialize(deck) @current_slide = 0 @slides = [] @deck = deck end |
Instance Attribute Details
#current_slide ⇒ Object
Returns the value of attribute current_slide.
16 17 18 |
# File 'lib/lecture/runner.rb', line 16 def @current_slide end |
#deck ⇒ Object
Returns the value of attribute deck.
16 17 18 |
# File 'lib/lecture/runner.rb', line 16 def deck @deck end |
#slides ⇒ Object
Returns the value of attribute slides.
16 17 18 |
# File 'lib/lecture/runner.rb', line 16 def @slides end |
Instance Method Details
#configure {|Config.new| ... } ⇒ Object
33 34 35 |
# File 'lib/lecture/runner.rb', line 33 def configure yield(Config.new) end |
#execute ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/lecture/runner.rb', line 24 def execute instance_eval(File.read(deck)) loop do command_handler end end |