Class: SolidusClient::CLI

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

Overview

The class responsible of handling command line logic

Instance Method Summary collapse

Instance Method Details

#runObject

Entry point to start the application



12
13
14
15
16
17
18
19
20
21
# File 'lib/solidus_client/cli.rb', line 12

def run
  client = Client.new(parse_options)
  command = ARGV.shift.to_sym
  args = convert_data_input

  result = client.send(command, *args)
  pp result
rescue OptionParser::InvalidOption => e
  abort("#{e.message}, see 'solidus --help'")
end