Class: RR::TimesCalledMatchers::RangeMatcher
Instance Attribute Summary
#times
Instance Method Summary
collapse
Methods included from Terminal
#terminal?
#==, create, #error_message, #initialize
Instance Method Details
#attempt?(times_called) ⇒ Boolean
16
17
18
|
# File 'lib/rr/times_called_matchers/range_matcher.rb', line 16
def attempt?(times_called)
possible_match?(times_called)
end
|
#matches?(times_called) ⇒ Boolean
12
13
14
|
# File 'lib/rr/times_called_matchers/range_matcher.rb', line 12
def matches?(times_called)
@times.include?(times_called)
end
|
#possible_match?(times_called) ⇒ Boolean
6
7
8
9
10
|
# File 'lib/rr/times_called_matchers/range_matcher.rb', line 6
def possible_match?(times_called)
return true if times_called < @times.begin
return true if @times.include?(times_called)
return false
end
|