Class: Ruby::Merge::NocovNodeBase::Location

Inherits:
Struct
  • Object
show all
Defined in:
lib/ruby/merge/nocov_node_base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#end_lineObject

Returns the value of attribute end_line

Returns:

  • (Object)

    the current value of end_line



15
16
17
# File 'lib/ruby/merge/nocov_node_base.rb', line 15

def end_line
  @end_line
end

#start_lineObject

Returns the value of attribute start_line

Returns:

  • (Object)

    the current value of start_line



15
16
17
# File 'lib/ruby/merge/nocov_node_base.rb', line 15

def start_line
  @start_line
end

Instance Method Details

#cover?(line) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/ruby/merge/nocov_node_base.rb', line 16

def cover?(line)
  (start_line..end_line).cover?(line)
end