class Cucumber::Core::Test::Location::Lines
Public Class Methods
new(raw_data)
click to toggle source
Calls superclass method
# File lib/cucumber/core/test/location.rb, line 102 def initialize(raw_data) super Array(raw_data).to_set end
Public Instance Methods
+(other)
click to toggle source
# File lib/cucumber/core/test/location.rb, line 122 def +(other) new_data = data + other.data self.class.new(new_data) end
first()
click to toggle source
# File lib/cucumber/core/test/location.rb, line 106 def first data.first end
include?(other)
click to toggle source
# File lib/cucumber/core/test/location.rb, line 118 def include?(other) other.data.subset?(data) || data.subset?(other.data) end
inspect()
click to toggle source
# File lib/cucumber/core/test/location.rb, line 134 def inspect "<#{self.class}: #{self}>" end
max()
click to toggle source
# File lib/cucumber/core/test/location.rb, line 114 def max data.max end
min()
click to toggle source
# File lib/cucumber/core/test/location.rb, line 110 def min data.min end
to_s()
click to toggle source
# File lib/cucumber/core/test/location.rb, line 127 def to_s return first.to_s if data.length == 1 return "#{data.min}..#{data.max}" if range? data.to_a.join(":") end
Protected Instance Methods
range?()
click to toggle source
# File lib/cucumber/core/test/location.rb, line 140 def range? data.size == (data.max - data.min + 1) end