Class: Slideck::Runner Private
- Inherits:
-
Object
- Object
- Slideck::Runner
- Defined in:
- lib/slideck/runner.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.
Parse and display slides
Instance Method Summary collapse
-
#initialize(screen, input, output, env) ⇒ Runner
constructor
Create a Runner instance.
-
#run(filename, color: nil, watch: nil) ⇒ void
Run the slides in a terminal.
Constructor Details
#initialize(screen, input, output, env) ⇒ Runner
Create a Runner instance
46 47 48 49 50 51 |
# File 'lib/slideck/runner.rb', line 46 def initialize(screen, input, output, env) @screen = screen @input = input @output = output @env = env end |
Instance Method Details
#run(filename, color: nil, watch: nil) ⇒ void
This method returns an undefined value.
Run the slides in a terminal
68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/slideck/runner.rb', line 68 def run(filename, color: nil, watch: nil) transformer = build_transformer presenter = build_presenter(color) { transformer.read(filename) } if watch listener = build_listener(filename) { presenter.reload.render } listener.start end presenter.start ensure listener && listener.stop end |