Class: Spellr::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/spellr/cli.rb,
lib/spellr/cli_options.rb

Defined Under Namespace

Classes: Options

Instance Method Summary collapse

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

#runObject



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.message)) && 1
  1
end