Class: ParserLogger

Inherits:
Logger show all
Defined in:
parser_logger.rb

Overview

A Logger implementation for ParserBuilder which outputs all states and transitions of a StateMachine to the standard output

Instance Method Summary collapse

Instance Method Details

#log(data = {}) ⇒ Object

See Also:


6
7
8
9
# File 'parser_logger.rb', line 6

def log(data = {})
  state = data.fetch(:state)
  puts "#{data.fetch(:character).strip} #{state.name}"
end