Class: Base4R::ProductItem
- Inherits:
-
UniversalItem
- Object
- Item
- UniversalItem
- Base4R::ProductItem
- Defined in:
- lib/item.rb
Overview
ProductItem is a standard item type. This class includes some of the attributes that are suggested or required for the Product item type.
Instance Attribute Summary
Attributes inherited from Item
#attributes, #base_id, #draft, #title, #unique_id
Instance Method Summary collapse
-
#price(price_amount, price_units = nil) ⇒ Object
rewrite to satisfy old style of price setting set_price 5, ‘usd’ set_price :value => 5, :units => ‘usd’.
Methods inherited from UniversalItem
Methods inherited from Item
#draft?, #options_from_value, #to_xml
Methods included from ItemAttributeMethods
Constructor Details
This class inherits a constructor from Base4R::UniversalItem
Instance Method Details
#price(price_amount, price_units = nil) ⇒ Object
rewrite to satisfy old style of price setting
set_price 5, 'usd'
set_price :value => 5, :units => 'usd'
281 282 283 |
# File 'lib/item.rb', line 281 def price(price_amount, price_units=nil) add_attribute :price, :value => price_amount, :units => price_units end |