Class: Mode::CLI::Base
- Inherits:
-
Thor
- Object
- Thor
- Mode::CLI::Base
- Defined in:
- lib/mode/cli/base.rb,
lib/mode/cli/login.rb,
lib/mode/cli/connect.rb
Instance Method Summary collapse
Instance Method Details
#connect(command = 'start') ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/mode/cli/connect.rb', line 13 def connect(command = 'start') if command == 'verify' Mode::Commands::Connect.new(command, ).verify! say "Success! All config and connectivity checks passed" elsif ['start', 'status', 'stop', 'restart'].include?(command) Mode::Commands::Connect.new(command, ).execute else say "Error: valid commands for connect are start, stop and restart" end rescue => err say "Error: #{err.message} #{err.backtrace}" end |
#login ⇒ Object
8 9 10 |
# File 'lib/mode/cli/login.rb', line 8 def login Mode::Commands::Login.new().execute end |
#version ⇒ Object
11 12 13 |
# File 'lib/mode/cli/base.rb', line 11 def version say "Mode Connector Version #{Mode::VERSION}" end |