Class: FIS::CLI::Base

Inherits:
Thor
  • Object
show all
Defined in:
lib/fis/cli.rb

Overview

Root for all Thor CLI-based commands

Constant Summary collapse

Error =
Class.new(StandardError)

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Base

Returns a new instance of Base.



11
12
13
14
15
16
17
# File 'lib/fis/cli.rb', line 11

def initialize(*args)
  super

  prompt = TTY::Prompt.new(enable_color: !options['no-color'])
  FIS.ui = UI.new(prompt)
  FIS.ui.debug! if options['verbose']
end

Instance Method Details

#versionObject



20
21
22
# File 'lib/fis/cli.rb', line 20

def version
  puts "v#{FIS::VERSION}"
end