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



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

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