require_relative './ika' class ConsoleHandler < Ika def start! @handling_messages = true while @handling_messages handle_message Message::Console.new(responder(nil), gets.chomp) end end def stop! @handling_messages = false end def responder(_) lambda { |response| puts " #{response}" } end end