Sha256: f8a09d49fa56d609b4fadee49b8386bf1d5fac541486de17bc28b9204f09de63
Contents?: true
Size: 406 Bytes
Versions: 2
Compression:
Stored size: 406 Bytes
Contents
module Kosher # Shipping details of an offer. # # Shipping costs something (or nothing) and is subject to availability. class Shipping < Structure has_one :cost has_one :availability # Returns whether the item ships for free. def free? cost.cents == 0 end # Returns true if the item is available to ship. def kosher? availability.kosher? end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kosher-0.8.0 | lib/kosher/shipping.rb |
kosher-0.7.0 | lib/kosher/shipping.rb |