Class: Yobi::CheckErrors
- Inherits:
-
Object
- Object
- Yobi::CheckErrors
- Includes:
- Enumerable, Enumerable[CheckError]
- Defined in:
- lib/yobi/repository/check.rb,
sig/yobi.rbs
Overview
Enumerable over every CheckError in a run.
Instance Method Summary collapse
-
#each {|error| ... } ⇒ Enumerator
If no block is given.
-
#initialize(output) ⇒ CheckErrors
constructor
A new instance of CheckErrors.
Constructor Details
#initialize(output) ⇒ CheckErrors
Returns a new instance of CheckErrors.
81 82 83 |
# File 'lib/yobi/repository/check.rb', line 81 def initialize(output) @output = output end |
Instance Method Details
#each ⇒ void #each ⇒ Enumerator[CheckError, void]
Returns if no block is given.
87 88 89 90 91 92 93 94 |
# File 'lib/yobi/repository/check.rb', line 87 def each return enum_for(:each) unless block_given? @output.index["error"].each do |offset| line = @output.read_line_at(offset) yield CheckError.new(JSON.parse(line)) end end |