Module: Link
- Extended by:
- Entity
- Defined in:
- lib/rbbt/rest/common/table.rb
Class Method Summary collapse
Class Method Details
.tsv_sort(v) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rbbt/rest/common/table.rb', line 6 def self.tsv_sort(v) value = v.last value = value.first if Array === value and value.length == 1 if String === value and value.match(/<a [^>]*>([^>]*)<\/a>/) val = $1 if val =~ /^\s*\d/ val.to_f else 1 end elsif Array === value value.length else 0 end end |