Module: Change
- Extended by:
- Entity
- Defined in:
- lib/rbbt/rest/common/table.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.tsv_sort(v) ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/rbbt/rest/common/table.rb', line 44 def self.tsv_sort(v) value = v.last if Array === value value.first.scan(/\d+/).first.to_f else value.scan(/\d+/).first.to_f end end |
Instance Method Details
#<=>(other) ⇒ Object
40 41 42 |
# File 'lib/rbbt/rest/common/table.rb', line 40 def <=>(other) self.scan(/\d+/).first.to_f <=> other.scan(/\d+/).first.to_f end |