Class: Holivia::CLI
- Inherits:
-
Object
- Object
- Holivia::CLI
- Defined in:
- lib/holivia/cli.rb,
lib/holivia/cli/help.rb
Defined Under Namespace
Modules: Help
Class Method Summary collapse
Class Method Details
.start(args) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/holivia/cli.rb', line 14 def self.start(args) command = args.shift case command when "login" then Commands::Auth.new.login(args) when "logout" then Commands::Auth.new.logout when "env" then Commands::Env.route(args) when "selfcare" then Commands::Selfcare.route(args) when "version", "--version", "-v" then puts "holivia #{Holivia::VERSION}" when "--help", "-h", nil then puts Help::HELP_TEXT else warn "Unknown command: #{command}" exit 1 end end |