Sha256: a762ea4bd18925fbae841946d08d4ead82c0c5d33eee8d0bc6fa1f6bd5f79903

Contents?: true

Size: 155 Bytes

Versions: 4

Compression:

Stored size: 155 Bytes

Contents

module Kosher
  class Unit < Structure
    key :cents, Integer
    key :currency, String

    def price
      Money.new(cents, currency)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kosher-0.17.2 lib/kosher/unit.rb
kosher-0.17.1 lib/kosher/unit.rb
kosher-0.17.0 lib/kosher/unit.rb
kosher-0.16.0 lib/kosher/unit.rb