class Coverfield::Source::NocovRange
Represents a range of lines in a source file which is wrapped in :nocov: tags
Public Class Methods
new(first_line, last_line)
click to toggle source
Consructor
# File lib/coverfield/source/nocov_range.rb, line 4 def initialize(first_line, last_line) @first_line = first_line @last_line = last_line end
Public Instance Methods
includes?(node)
click to toggle source
Tells if a node is within that nocov rage
# File lib/coverfield/source/nocov_range.rb, line 10 def includes?(node) source_range = node.source_range source_range.first_line > @first_line && source_range.last_line < @last_line end