Class: Parser::Reporter
- Inherits:
-
Object
- Object
- Parser::Reporter
- Defined in:
- lib/parser/reporter.rb
Constant Summary collapse
- EVENT_TYPE_COLORS =
{ open: :green, close: :blue, unknown: :white }.freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(event) ⇒ Reporter
constructor
A new instance of Reporter.
- #report ⇒ Object
Constructor Details
#initialize(event) ⇒ Reporter
Returns a new instance of Reporter.
15 16 17 |
# File 'lib/parser/reporter.rb', line 15 def initialize(event) @event = event end |
Class Method Details
.report(event) ⇒ Object
11 12 13 |
# File 'lib/parser/reporter.rb', line 11 def self.report(event) new(event).report end |
Instance Method Details
#report ⇒ Object
19 20 21 |
# File 'lib/parser/reporter.rb', line 19 def report "#{datetime} #{user_name}: #{description}" end |