Class: Spree::FeaturedProductPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/spree/featured_product_presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_variantObject (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_optionsObject (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
  @variant_from_options
end