Module: Torque::PostgreSQL::Adapter::OID::Range::Comparasion

Defined in:
lib/torque/postgresql/adapter/oid/range.rb

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



9
10
11
12
13
# File 'lib/torque/postgresql/adapter/oid/range.rb', line 9

def <=>(other)
  return super unless other.acts_like?(:date) || other.acts_like?(:time)
  other = other.to_time if other.acts_like?(:date)
  super other.to_i
end