Sha256: 69b805ba443fdaf1c05d815b8f5bd2152f0490a745b026e9423c8574da34abac

Contents?: true

Size: 244 Bytes

Versions: 24

Compression:

Stored size: 244 Bytes

Contents

module Kosher
  class Shipping < Struct.new(:cents, :currency, :availability)
    def free?
      cents.to_i == 0
    end

    def kosher?
      availability.kosher?
    end

    def cost
      Money.new(cents.to_i, currency)
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
kosher-0.2.24 lib/kosher/shipping.rb
kosher-0.2.23 lib/kosher/shipping.rb
kosher-0.2.22 lib/kosher/shipping.rb
kosher-0.2.21 lib/kosher/shipping.rb
kosher-0.2.20 lib/kosher/shipping.rb
kosher-0.2.19 lib/kosher/shipping.rb
kosher-0.2.18 lib/kosher/shipping.rb
kosher-0.2.17 lib/kosher/shipping.rb
kosher-0.2.16 lib/kosher/shipping.rb
kosher-0.2.15 lib/kosher/shipping.rb
kosher-0.2.14 lib/kosher/shipping.rb
kosher-0.2.13 lib/kosher/shipping.rb
kosher-0.2.12 lib/kosher/shipping.rb
kosher-0.2.11 lib/kosher/shipping.rb
kosher-0.2.10 lib/kosher/shipping.rb
kosher-0.2.9 lib/kosher/shipping.rb
kosher-0.2.8 lib/kosher/shipping.rb
kosher-0.2.7 lib/kosher/shipping.rb
kosher-0.2.6 lib/kosher/shipping.rb
kosher-0.2.5 lib/kosher/shipping.rb