# File lib/filesize.rb, line 149 def parse(string) type = nil # in this order, so we prefer binary :) [BINARY, SI].each { |_type| if string =~ _type[:regexp] type = _type break end } prefix = $2 || '' size = ($1 || 0).to_f return { :prefix => prefix, :size => size, :type => type} end