@api private Provides the implementation for `be_between`. Not intended to be instantiated directly.
@api private @return [String]
# File lib/rspec/matchers/built_in/be_between.rb, line 57 def description "be between #{@min.inspect} and #{@max.inspect} (#{@mode})" end
@api public Makes the between comparison exclusive.
@example
expect(3).to be_between(2, 4).exclusive
# File lib/rspec/matchers/built_in/be_between.rb, line 33 def exclusive @less_than_operator = :< @greater_than_operator = :> @mode = :exclusive self end
@api private @return [String]
# File lib/rspec/matchers/built_in/be_between.rb, line 51 def failure_message "#{super}#{not_comparable_clause}" end
@api public Makes the between comparison inclusive.
@example
expect(3).to be_between(2, 3).inclusive
@note The matcher is inclusive by default; this simply provides
a way to be more explicit about it.
# File lib/rspec/matchers/built_in/be_between.rb, line 21 def inclusive @less_than_operator = :<= @greater_than_operator = :>= @mode = :inclusive self end
Generated with the Darkfish Rdoc Generator 2.