Module: StaticModel::Comparable

Includes:
Comparable
Included in:
Base
Defined in:
lib/static_model/comparable.rb

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/static_model/comparable.rb', line 5

def <=>(other)
  if self.class == other.class 
    self.id <=> other.id
  else
    -1
  end
end