Module: SimpleCov::Formatter::AIFormatter::LineSpan

Extended by:
T::Sig
Defined in:
lib/simplecov-ai/line_span.rb

Overview

Containment predicates over inclusive source-line ranges, shared by bypass attribution (skip regions against semantic nodes) and branch rendering (arms against sibling arms).

Class Method Summary collapse

Class Method Details

.encloses?(outer, inner) ⇒ Boolean



16
17
18
# File 'lib/simplecov-ai/line_span.rb', line 16

def self.encloses?(outer, inner)
  outer.cover?(inner)
end

.strictly_encloses?(outer, inner) ⇒ Boolean



24
25
26
# File 'lib/simplecov-ai/line_span.rb', line 24

def self.strictly_encloses?(outer, inner)
  encloses?(outer, inner) && line_count(outer) > line_count(inner)
end