Class: Slideck::CLI Private
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 parsing command line inputs
Instance Method Summary collapse
-
#initialize(runner, output, error_output) ⇒ CLI
constructor
Create a CLI instance.
-
#start(cmd_args, env) ⇒ void
Start presenting slides deck.
Constructor Details
#initialize(runner, output, error_output) ⇒ CLI
Create a CLI instance
113 114 115 116 117 |
# File 'lib/slideck/cli.rb', line 113 def initialize(runner, output, error_output) @runner = runner @output = output @error_output = error_output end |
Instance Method Details
#start(cmd_args, env) ⇒ void
This method returns an undefined value.
Start presenting slides deck
134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/slideck/cli.rb', line 134 def start(cmd_args, env) parse(cmd_args, env) print_version || print_help || print_errors rescue_errors do @runner.run(params[:file], color: color(no_color_env?(cmd_args, env)), watch: params[:watch]) end end |