Class: Superbot::Cloud::CLI::Run::ConsoleCommand

Inherits:
BaseCommand show all
Defined in:
lib/superbot/cloud/cli/run/console_command.rb

Instance Method Summary collapse

Methods inherited from LoginRequiredCommand

#run, run

Methods included from Validations

#require_login

Instance Method Details

#executeObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/superbot/cloud/cli/run/console_command.rb', line 10

def execute
  abort "Run is not active anymore" if fetch_interaction[:status] == 'aborted'
  loop do
    printf '> '
    input = $stdin.gets
    exit if input.nil?
    cmd, arg = input.rstrip.split(' ')
    invoke_command(cmd, arg)
  end
end