class Cucumber::Core::Test::Location::Precise

Public Instance Methods

hash() click to toggle source
# File lib/cucumber/core/test/location.rb, line 74
def hash
  [self.class, to_s].hash
end
include?(other_lines) click to toggle source
# File lib/cucumber/core/test/location.rb, line 56
def include?(other_lines)
  lines.include?(other_lines)
end
inspect() click to toggle source
# File lib/cucumber/core/test/location.rb, line 93
def inspect
  "<#{self.class}: #{to_s}>"
end
line() click to toggle source
# File lib/cucumber/core/test/location.rb, line 60
def line
  lines.first
end
match?(other) click to toggle source
# File lib/cucumber/core/test/location.rb, line 64
def match?(other)
  return false unless other.file == file

  other.include?(lines)
end
merge(multiline_arg) click to toggle source
# File lib/cucumber/core/test/location.rb, line 82
def merge(multiline_arg)
  new_lines = (0..multiline_arg.lines_count).map do |offset|
    lines.min + offset
  end
  Location.new(file, new_lines)
end
on_line(new_line) click to toggle source
# File lib/cucumber/core/test/location.rb, line 89
def on_line(new_line)
  Location.new(file, new_line)
end
to_s() click to toggle source
# File lib/cucumber/core/test/location.rb, line 70
def to_s
  [file, lines.to_s].join(":")
end
to_str() click to toggle source
# File lib/cucumber/core/test/location.rb, line 78
def to_str
  to_s
end