Class: Symbol

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/unit.rb,
lib/unit.rb

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



480
481
482
# File 'lib/unit.rb', line 480

def <=>(other)
  self.to_i <=> other.to_i
end

#to_unit(system = nil) ⇒ Object



463
464
465
# File 'lib/unit.rb', line 463

def to_unit(system = nil)
  to_s.to_unit(system)
end