Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/maveric/extensions.rb

Instance Method Summary collapse

Instance Method Details

#<=>(obj) ⇒ Object

#to_s makes sense, but #to_i is just as effective.



18
19
20
21
22
# File 'lib/maveric/extensions.rb', line 18

def <=> obj
  obj.instance_of?(Symbol) ?
    self.to_i <=> obj.to_i :
    super
end