Class: RSpec::Covers::MethodEntry

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec/covers/method_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



5
6
7
# File 'lib/rspec/covers/method_entry.rb', line 5

def file
  @file
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



5
6
7
# File 'lib/rspec/covers/method_entry.rb', line 5

def label
  @label
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



5
6
7
# File 'lib/rspec/covers/method_entry.rb', line 5

def line
  @line
end

#regionObject

Returns the value of attribute region

Returns:

  • (Object)

    the current value of region



5
6
7
# File 'lib/rspec/covers/method_entry.rb', line 5

def region
  @region
end

Instance Method Details

#include?(location) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/rspec/covers/method_entry.rb', line 6

def include?(location)
  region.include?(location)
end

#to_hObject



10
11
12
13
14
15
16
# File 'lib/rspec/covers/method_entry.rb', line 10

def to_h
  {
    label: label,
    file: file,
    line: line
  }
end