Class: RakResult

Inherits:
Object
  • Object
show all
Defined in:
lib/janitor/rak_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_outputObject

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_namesObject



8
9
10
# File 'lib/janitor/rak_result.rb', line 8

def file_names
  hits.collect { |hit| hit.file_name }.uniq
end

#hitsObject



12
13
14
# File 'lib/janitor/rak_result.rb', line 12

def hits
  rak_output.split("\n").collect { |row| RakHit.new(row) }
end