Sha256: 04c132dd3744c8b23a0cdf284591e312b405cca29205a5c3cfc70bdc3e1bb5cd

Contents?: true

Size: 167 Bytes

Versions: 6

Compression:

Stored size: 167 Bytes

Contents

# frozen_string_literal: true

class Integer
  # Returns self as a money (treated as cents)
  def total_money
    zero? ? ::Money.new(0) : ::Money.new(self)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
money_extensions-1.5.0 lib/money_extensions/integer.rb
money_extensions-1.4.0 lib/money_extensions/integer.rb
money_extensions-1.3.0 lib/money_extensions/integer.rb
money_extensions-1.2.0 lib/money_extensions/integer.rb
money_extensions-1.1.0 lib/money_extensions/integer.rb
money_extensions-1.0.0 lib/money_extensions/integer.rb