Class: Suspect::Storage::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/suspect/storage/reader.rb

Instance Method Summary collapse

Constructor Details

#initialize(base_path, file_helper) ⇒ Reader

Returns a new instance of Reader.



6
7
8
9
# File 'lib/suspect/storage/reader.rb', line 6

def initialize(base_path, file_helper)
  @base_path = base_path
  @file_helper = file_helper
end

Instance Method Details

#foreachObject



11
12
13
14
15
16
17
# File 'lib/suspect/storage/reader.rb', line 11

def foreach
  run_info_paths.each do |path|
    file_helper.read(path) do |line|
      yield run_info_from(line)
    end
  end
end