method
include_with_range?
v2.0.3 -
Show latest stable
- Class:
ActiveSupport::CoreExtensions::Range::IncludeRange
include_with_range?(value)public
No documentation available.
# File activesupport/lib/active_support/core_ext/range/include_range.rb, line 10
def include_with_range?(value)
if value.is_a?(::Range)
operator = exclude_end? ? :< : :<=
end_value = value.exclude_end? ? last.succ : last
include?(value.first) && (value.last <=> end_value).send(operator, 0)
else
include_without_range?(value)
end
end