class LogMessage

LogMessage - prints a message to the log (currently just whatever screen is running the listener)

Public Class Methods

new(message) click to toggle source
Calls superclass method Message::new
# File lib/test_driven_lighting/messages/log_message.rb, line 6
def initialize message
  super
end

Public Instance Methods

process() click to toggle source
# File lib/test_driven_lighting/messages/log_message.rb, line 10
def process
  content = message.fetch 'content'
  puts "%s %s" % [timestamp, content]
end

Private Instance Methods

timestamp() click to toggle source
# File lib/test_driven_lighting/messages/log_message.rb, line 17
def timestamp
  Time.new.strftime "%F %T"
end