Sha256: a220220083980c471f080f7c988cc2b68ca465d13f53a3e6019a96df6eefca65

Contents?: true

Size: 143 Bytes

Versions: 8

Compression:

Stored size: 143 Bytes

Contents

class Float

  def as_currency
    out = '%.2f' % self
    out = out.sub('.', ',')
    out = out.sub(/(\d)(\d{3})/, '\1.\2')
    out
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lux-fw-0.5.37 ./lib/overload/float.rb
lux-fw-0.5.36 ./lib/overload/float.rb
lux-fw-0.5.35 ./lib/overload/float.rb
lux-fw-0.5.34 ./lib/overload/float.rb
lux-fw-0.5.33 ./lib/overload/float.rb
lux-fw-0.5.32 ./lib/overload/float.rb
lux-fw-0.2.3 ./lib/overload/float.rb
lux-fw-0.2.1 ./lib/overload/float.rb