Class: Seedie::Reporters::BaseReporter
- Inherits:
-
Object
- Object
- Seedie::Reporters::BaseReporter
- Defined in:
- lib/seedie/reporters/base_reporter.rb
Direct Known Subclasses
Constant Summary collapse
- INDENT_SIZE =
2
Instance Attribute Summary collapse
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#reports ⇒ Object
readonly
Returns the value of attribute reports.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(output = nil) ⇒ BaseReporter
constructor
A new instance of BaseReporter.
- #update(event_type, options) ⇒ Object
Constructor Details
#initialize(output = nil) ⇒ BaseReporter
Returns a new instance of BaseReporter.
10 11 12 13 14 |
# File 'lib/seedie/reporters/base_reporter.rb', line 10 def initialize(output = nil) @output = output || StringIO.new @reports = [] @indent_level = 0 end |
Instance Attribute Details
#output ⇒ Object (readonly)
Returns the value of attribute output.
8 9 10 |
# File 'lib/seedie/reporters/base_reporter.rb', line 8 def output @output end |
#reports ⇒ Object (readonly)
Returns the value of attribute reports.
8 9 10 |
# File 'lib/seedie/reporters/base_reporter.rb', line 8 def reports @reports end |
Instance Method Details
#close ⇒ Object
20 21 22 23 24 |
# File 'lib/seedie/reporters/base_reporter.rb', line 20 def close return if output.closed? output.flush end |
#update(event_type, options) ⇒ Object
16 17 18 |
# File 'lib/seedie/reporters/base_reporter.rb', line 16 def update(event_type, ) raise NotImplementedError, "Subclasses must define 'update'." end |