Class: Klenod::Test::CoverageResult
- Inherits:
-
Covered::Wrapper
- Object
- Covered::Wrapper
- Klenod::Test::CoverageResult
- Defined in:
- lib/klenod/test/coverage.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(output, context:, plugin:) ⇒ CoverageResult
constructor
A new instance of CoverageResult.
Constructor Details
#initialize(output, context:, plugin:) ⇒ CoverageResult
Returns a new instance of CoverageResult.
12 13 14 15 16 17 18 |
# File 'lib/klenod/test/coverage.rb', line 12 def initialize(output, context:, plugin:) super(output) @modules_by_path = context.graph.mods.to_h do |module_id, mod| [File.(mod.eval_path), [module_id, mod]] end @plugin = plugin end |
Instance Method Details
#each ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/klenod/test/coverage.rb', line 20 def each return enum_for unless block_given? super do |coverage| mapped = map(coverage) yield mapped if mapped end end |