Class: MetricFu::Cli::Client

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

Instance Method Summary collapse

Constructor Details

#initializeClient

Returns a new instance of Client.



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

def initialize
  @helper = MetricFu::Cli::Helper.new
end

Instance Method Details

#run(argv = ARGV.dup) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/metric_fu/cli/client.rb', line 15

def run(argv = ARGV.dup)
  options =  @helper.process_options(argv)
  mf_debug "Got options #{options.inspect}"
  if options[:run]
    @helper.run(options)
  else
    STDOUT.puts @helper.usage
  end
end

#shutdownObject



11
12
13
# File 'lib/metric_fu/cli/client.rb', line 11

def shutdown
  @helper.shutdown
end