Class: Spree::FeaturedProductPresenter
- Inherits:
-
Object
- Object
- Spree::FeaturedProductPresenter
- Defined in:
- app/presenters/spree/featured_product_presenter.rb
Instance Attribute Summary collapse
-
#selected_variant ⇒ Object
readonly
Returns the value of attribute selected_variant.
-
#variant_from_options ⇒ Object
readonly
Returns the value of attribute variant_from_options.
Instance Method Summary collapse
-
#initialize(section, params:, currency:) ⇒ FeaturedProductPresenter
constructor
A new instance of FeaturedProductPresenter.
Constructor Details
#initialize(section, params:, currency:) ⇒ FeaturedProductPresenter
Returns a new instance of FeaturedProductPresenter.
3 4 5 6 7 8 9 |
# File 'app/presenters/spree/featured_product_presenter.rb', line 3 def initialize(section, params:, currency:) @section = section @params = params @currency = currency initialize_selected_variants if product end |
Instance Attribute Details
#selected_variant ⇒ Object (readonly)
Returns the value of attribute selected_variant.
11 12 13 |
# File 'app/presenters/spree/featured_product_presenter.rb', line 11 def selected_variant @selected_variant end |
#variant_from_options ⇒ Object (readonly)
Returns the value of attribute variant_from_options.
11 12 13 |
# File 'app/presenters/spree/featured_product_presenter.rb', line 11 def @variant_from_options end |