Class: Expire::ReportBase
- Inherits:
-
ReportNull
- Object
- ReportNull
- Expire::ReportBase
- Defined in:
- lib/expire/report_base.rb
Overview
Base class for Reporters
Direct Known Subclasses
Instance Attribute Summary collapse
-
#receiver ⇒ Object
readonly
Returns the value of attribute receiver.
Instance Method Summary collapse
- #error(message) ⇒ Object
-
#initialize(receiver: $stdout) ⇒ ReportBase
constructor
A new instance of ReportBase.
- #pastel ⇒ Object
Methods inherited from ReportNull
#after_all, #after_purge, #before_all, #before_purge, #on_keep
Constructor Details
#initialize(receiver: $stdout) ⇒ ReportBase
Returns a new instance of ReportBase.
9 10 11 |
# File 'lib/expire/report_base.rb', line 9 def initialize(receiver: $stdout) @receiver = receiver end |
Instance Attribute Details
#receiver ⇒ Object (readonly)
Returns the value of attribute receiver.
13 14 15 |
# File 'lib/expire/report_base.rb', line 13 def receiver @receiver end |
Instance Method Details
#error(message) ⇒ Object
15 16 17 |
# File 'lib/expire/report_base.rb', line 15 def error() receiver.puts(pastel.red()) end |
#pastel ⇒ Object
19 20 21 |
# File 'lib/expire/report_base.rb', line 19 def pastel @pastel ||= ::Pastel.new end |