class Glottis::Handlers::ConsoleInputHandler
This class holds a reference to the outgoing message queue, and posts messages to it from the console as they are entered.
Constants
- USER_PROMPT
Public Class Methods
new(outgoing)
click to toggle source
Calls superclass method
# File lib/glottis/handlers/console_input_handler.rb, line 11 def initialize(outgoing) @outgoing = outgoing super do loop do user_input = Readline.readline(USER_PROMPT) Readline::HISTORY.push(user_input) # if user_input.nil? # raise Glottis::Exceptions::UserExitedException.new # end @outgoing.push(user_input) end end end
Public Instance Methods
cleanup()
click to toggle source
# File lib/glottis/handlers/console_input_handler.rb, line 27 def cleanup # do nothing end