Class: Reviewer::Output::Scrubber
- Inherits:
-
Object
- Object
- Reviewer::Output::Scrubber
- Defined in:
- lib/reviewer/output/scrubber.rb
Overview
Provides a structure interface for the results of running a command
Constant Summary collapse
- RAKE_ABORTED_TEXT =
A lot of tools are run via rake which inclues some unhelpful drive when there’s a non-zero
exit status. This is what it starts with so Reviewer can recognize and remove it.
<<~DRIVEL rake aborted! DRIVEL
Instance Attribute Summary collapse
-
#raw ⇒ Object
Returns the value of attribute raw.
Instance Method Summary collapse
- #clean ⇒ Object
-
#initialize(raw) ⇒ self
constructor
Creates a scrubber instance for the provided text content.
Constructor Details
#initialize(raw) ⇒ self
Creates a scrubber instance for the provided text content
19 20 21 |
# File 'lib/reviewer/output/scrubber.rb', line 19 def initialize(raw) @raw = raw || '' end |
Instance Attribute Details
#raw ⇒ Object
Returns the value of attribute raw.
13 14 15 |
# File 'lib/reviewer/output/scrubber.rb', line 13 def raw @raw end |
Instance Method Details
#clean ⇒ Object
23 24 25 |
# File 'lib/reviewer/output/scrubber.rb', line 23 def clean rake_aborted_text? ? preceding_text : raw end |