Class EventFramework::PrintEventHandler
In: event.rb
Parent: EventHandler
WorkerThread EventDispatcher EventProcessor EventHandler NullEventHandler ChainEventHandler PrintEventHandler EventFramework EventGenerator Event EventFramework Module: EventFramework

Concrete implementation of an EventHandler that outputs a string representation of an Event to a file (standard output by default).

Methods
handle_event    new   
Public Class methods
new(file=$defout, flush=true)

Creates a PrintEventHandler with the specified arguments:

file
Events are written to this file. If this file is a terminal, be sure to set the flush argument to true.
flush
If true, the file is flushed after each Event is written. This is useful when writing to a terminal using standard output.
Public Instance methods
handle_event(event)

Writes a string representation of the event to the file that was specified in the constructor. This method returns true which permits subsequent handlers in a chain the chance to process the event.

event
The Event to be processed.