Module: ActiveSupport::IncludeTimeWithZone
- Included in:
- Range
- Defined in:
- lib/active_support/core_ext/range/include_time_with_zone.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#include?(value) ⇒ Boolean
Extends the default Range#include? to support ActiveSupport::TimeWithZone.
Instance Method Details
#include?(value) ⇒ Boolean
11 12 13 14 15 16 17 18 19 |
# File 'lib/active_support/core_ext/range/include_time_with_zone.rb', line 11 def include?(value) if self.begin.is_a?(TimeWithZone) cover?(value) elsif self.end.is_a?(TimeWithZone) cover?(value) else super end end |