Sha256: 3aaf6b7f29983434e0cec8a64c51613aa45dd621539bddcb4bf2da6b6f0f2749

Contents?: true

Size: 193 Bytes

Versions: 2

Compression:

Stored size: 193 Bytes

Contents

class Numeric
  
  def to_money
    Money.new(self)
  end
  
  alias :cents :to_money
  alias :cent  :to_money
  
  def dollars
    Money.new(self*100)
  end
  
  alias :dollar :dollars
  
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
chrislloyd-coinage-0.2.0 lib/coinage/core_ext/numeric.rb
coinage-0.2.0 lib/coinage/core_ext/numeric.rb