lib/qooxview/additions.rb in qooxview-1.9.10 vs lib/qooxview/additions.rb in qooxview-1.9.11

- old
+ new

@@ -134,22 +134,10 @@ def self.from_db(d) (d.class == String) ? Date.strptime(d, '%Y-%m-%d') : d end end -class Fixnum - def separator(sep = ' ') - self.to_s.tap do |s| - :go while s.gsub!(/^([^.]*)(\d)(?=(\d{3})+)/, "\\1\\2#{sep}") - end - end - - def to_MB(label = 'MB') - "#{(self / 1_000_000).separator} #{label}" - end -end - -class Bignum +class Integer def separator(sep = ' ') self.to_s.tap do |s| :go while s.gsub!(/^([^.]*)(\d)(?=(\d{3})+)/, "\\1\\2#{sep}") end end