Method: ActiveIntelligence::ChatREPLService#cycle

Defined in:
app/services/active_intelligence/chat_repl_service.rb

#cycleObject



21
22
23
24
25
26
27
28
29
30
31
32
# File 'app/services/active_intelligence/chat_repl_service.rb', line 21

def cycle
  print prefix(:user)
  input = $stdin.gets.chomp
  case input
    when 'h' then help
    when 'p' then prompt
    when 'q' then return false
    else reply(input)
  end

  return true
end