Class: Tmrw::ConsoleCommand

Inherits:
Dry::CLI::Command
  • Object
show all
Includes:
Color
Defined in:
lib/tmrw/console_command.rb

Instance Method Summary collapse

Methods included from Color

#blue, #green, #red

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/tmrw/console_command.rb', line 10

def call(*)
  @current_namespace_name = "tmrw"

  loop do
    prompt = "#{blue(@current_namespace_name)} > "
    line = Readline.readline(prompt, true)
    evaluate(line)
  end
rescue Interrupt
  print "\nBye. Exiting console\n"
end