Class: SimpleCovMcp::Resolvers::CoverageLineResolver
- Inherits:
-
Object
- Object
- SimpleCovMcp::Resolvers::CoverageLineResolver
- Defined in:
- lib/simplecov_mcp/resolvers/coverage_line_resolver.rb
Instance Attribute Summary collapse
-
#cov_data ⇒ Object
readonly
Returns the value of attribute cov_data.
Instance Method Summary collapse
-
#initialize(cov_data) ⇒ CoverageLineResolver
constructor
A new instance of CoverageLineResolver.
- #lookup_lines(file_abs) ⇒ Object
Constructor Details
#initialize(cov_data) ⇒ CoverageLineResolver
Returns a new instance of CoverageLineResolver.
6 7 8 |
# File 'lib/simplecov_mcp/resolvers/coverage_line_resolver.rb', line 6 def initialize(cov_data) @cov_data = cov_data end |
Instance Attribute Details
#cov_data ⇒ Object (readonly)
Returns the value of attribute cov_data.
22 23 24 |
# File 'lib/simplecov_mcp/resolvers/coverage_line_resolver.rb', line 22 def cov_data @cov_data end |
Instance Method Details
#lookup_lines(file_abs) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/simplecov_mcp/resolvers/coverage_line_resolver.rb', line 10 def lookup_lines(file_abs) # First try exact match direct_match = find_direct_match(file_abs) return direct_match if direct_match # Then try without current working directory prefix stripped_match = find_stripped_match(file_abs) return stripped_match if stripped_match raise_not_found_error(file_abs) end |