Sha256: b3f322e1f5214efaa99037585db39487c78e10944867ef528a9d40f1e0027357
Contents?: true
Size: 521 Bytes
Versions: 32
Compression:
Stored size: 521 Bytes
Contents
module Dugway module Drops class ProductOptionDrop < BaseDrop def default position == 1 end def has_custom_price price != product.default_price end # Make up inventory numbers since we obviously don't want that from the API def quantity @quantity ||= sold_out ? 0 : rand(100) end def sold @sold ||= rand(100) end def inventory ((quantity.to_f / (quantity + sold).to_f) * 100).round end end end end
Version data entries
32 entries across 32 versions & 1 rubygems