class Glottis::Handlers::ConsoleOutputHandler

This class holds a reference to the incoming message queue, and displays messages in the console as they are received.

Public Class Methods

new(incoming) click to toggle source
Calls superclass method
# File lib/glottis/handlers/console_output_handler.rb, line 6
def initialize(incoming)
  @incoming = incoming
  super do
    loop do
      new_msg = @incoming.pop
      puts "#{new_msg['from']}, #{new_msg['to']}, #{new_msg['msg']}"
    end
  end
end

Public Instance Methods

cleanup() click to toggle source
# File lib/glottis/handlers/console_output_handler.rb, line 16
def cleanup
  puts '|'
end