mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Can't use "new" by itself like in Ruby
This commit is contained in:
parent
abc321130a
commit
90c5364946
1 changed files with 3 additions and 3 deletions
|
@ -42,19 +42,19 @@ module Spectator::Matchers
|
||||||
lower = center - diff
|
lower = center - diff
|
||||||
upper = center + diff
|
upper = center + diff
|
||||||
range = Range.new(lower, upper)
|
range = Range.new(lower, upper)
|
||||||
new("#{center} +/- #{label}", range)
|
RangeMatcher.new("#{center} +/- #{label}", range)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns a new matcher, with the same bounds, but uses an inclusive range.
|
# Returns a new matcher, with the same bounds, but uses an inclusive range.
|
||||||
def inclusive
|
def inclusive
|
||||||
range = Range.new(@expected.begin, @expected.end, exclusive: false)
|
range = Range.new(@expected.begin, @expected.end, exclusive: false)
|
||||||
new(label + " (inclusive)", range)
|
RangeMatcher.new(label + " (inclusive)", range)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns a new matcher, with the same bounds, but uses an exclusive range.
|
# Returns a new matcher, with the same bounds, but uses an exclusive range.
|
||||||
def exclusive
|
def exclusive
|
||||||
range = Range.new(@expected.begin, @expected.end, exclusive: true)
|
range = Range.new(@expected.begin, @expected.end, exclusive: true)
|
||||||
new(label + " (exclusive)", range)
|
RangeMatcher.new(label + " (exclusive)", range)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue