Class: Workarea::Storefront::ProductViewModel::SkuOptions
- Inherits:
-
Object
- Object
- Workarea::Storefront::ProductViewModel::SkuOptions
- Defined in:
- app/view_models/workarea/storefront/product_view_model/sku_options.rb
Instance Method Summary collapse
-
#initialize(variants) ⇒ SkuOptions
constructor
A new instance of SkuOptions.
- #to_a ⇒ Object
Constructor Details
#initialize(variants) ⇒ SkuOptions
Returns a new instance of SkuOptions.
5 6 7 |
# File 'app/view_models/workarea/storefront/product_view_model/sku_options.rb', line 5 def initialize(variants) @variants = variants end |
Instance Method Details
#to_a ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/view_models/workarea/storefront/product_view_model/sku_options.rb', line 9 def to_a if .one? else [[::I18n.t('workarea.storefront.products.select_options'), nil]] + end end |