Class: RakResult
- Inherits:
-
Object
- Object
- RakResult
- Defined in:
- lib/janitor/rak_result.rb
Instance Attribute Summary collapse
-
#rak_output ⇒ Object
Returns the value of attribute rak_output.
Instance Method Summary collapse
- #file_names ⇒ Object
- #hits ⇒ Object
-
#initialize(rak_output) ⇒ RakResult
constructor
A new instance of RakResult.
Constructor Details
#initialize(rak_output) ⇒ RakResult
Returns a new instance of RakResult.
4 5 6 |
# File 'lib/janitor/rak_result.rb', line 4 def initialize(rak_output) self.rak_output = rak_output.strip end |
Instance Attribute Details
#rak_output ⇒ Object
Returns the value of attribute rak_output.
2 3 4 |
# File 'lib/janitor/rak_result.rb', line 2 def rak_output @rak_output end |
Instance Method Details
#file_names ⇒ Object
8 9 10 |
# File 'lib/janitor/rak_result.rb', line 8 def file_names hits.collect { |hit| hit.file_name }.uniq end |
#hits ⇒ Object
12 13 14 |
# File 'lib/janitor/rak_result.rb', line 12 def hits rak_output.split("\n").collect { |row| RakHit.new(row) } end |