Class: Spellr::CLI
- Inherits:
-
Object
- Object
- Spellr::CLI
- Defined in:
- lib/spellr/cli.rb,
lib/spellr/cli_options.rb
Defined Under Namespace
Classes: Options
Instance Method Summary collapse
-
#initialize(argv) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ CLI
Returns a new instance of CLI.
10 11 12 13 |
# File 'lib/spellr/cli.rb', line 10 def initialize(argv) Spellr.config.reset! @argv = argv end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 |
# File 'lib/spellr/cli.rb', line 15 def run catch(:spellr_exit) { check } rescue Spellr::Error => e Spellr.config.output.warn(Spellr::StringFormat.red(e.)) && 1 1 end |