module Location

Public Class Methods

tsv_sort(v) click to toggle source
# File lib/rbbt/rest/common/table.rb, line 66
def self.tsv_sort(v)
  value = v.last
  if Array === value
    value.first.to_s.split(":").first.to_f
  else
    value.to_s.split(":").first.to_f
  end
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/rbbt/rest/common/table.rb, line 62
def <=>(other)
  self.to_s.split(":").first.to_f <=> other.to_s.split(":").first.to_f
end