Class: Kms::ProductDrop
- Inherits:
-
Liquor::Drop
- Object
- Liquor::Drop
- Kms::ProductDrop
- Defined in:
- lib/kms/drops/product_drop.rb
Instance Method Summary collapse
Instance Method Details
#image_url ⇒ Object
15 16 17 |
# File 'lib/kms/drops/product_drop.rb', line 15 def image_url source.image.url end |
#preview_image_url ⇒ Object
19 20 21 |
# File 'lib/kms/drops/product_drop.rb', line 19 def preview_image_url source.preview_image.url end |
#price ⇒ Object
23 24 25 |
# File 'lib/kms/drops/product_drop.rb', line 23 def price source.price.to_s end |
#properties ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/kms/drops/product_drop.rb', line 27 def properties props = [] source.properties.group_by(&:tag).each do |key, value| props << [key, value.map { |val| [val.name, val.value] }] end props end |