Method: App42::Command::Client.app42
- Defined in:
- lib/app42/command/client.rb
.app42(*args) ⇒ Object
call for require files Initiate client object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/app42/command/client.rb', line 33 def self.app42(*args ) begin action = args.shift.strip rescue 'help' App42::Command::Client.new.load_command_file App42::Command::Client.new.start(action, args) rescue Interrupt => e @exception_msg = e. rescue OptionParser::MissingArgument => e @exception_msg = e. rescue OptionParser::InvalidOption => e @exception_msg = e. rescue OptionParser::AmbiguousOption => e @exception_msg = e. rescue => error @exception_msg = e. ensure puts Paint["#{@exception_msg}", :red] @should_exit = true if @should_exit.nil? exit @should_exit end end |