Class: Referral::Cli

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

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Cli

Returns a new instance of Cli.



7
8
9
# File 'lib/referral/cli.rb', line 7

def initialize(argv)
  @options = ParsesOptions.new.call(argv)
end

Instance Method Details

#callObject



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

def call
  PrintsResults.new.call(Runner.new.call(@options), @options)
rescue => e
  warn "FATAL ERROR: #{e.message}"
  warn e.backtrace
  exit 1
end