Module: ORS::Command::ClassMethods
Instance Method Summary collapse
Instance Method Details
#run(args) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ors/command.rb', line 12 def run args command, * = args klass = command.to_s.capitalize if command =~ /-*version/i puts "ORS v#{ORS::VERSION}" else if available_commands.include? klass ORS::Config. ORS::Config.parse_config_file if ORS::Config. Base.run ORS::Commands.const_get(klass) else info "ERROR: Invalid options given." Base.run Help end else Base.run Help end end end |