Class: Spree::ProductSummaryPresenter

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

Instance Method Summary collapse

Constructor Details

#initialize(product) ⇒ ProductSummaryPresenter

Returns a new instance of ProductSummaryPresenter.



5
6
7
8
# File 'app/presenters/spree/product_summary_presenter.rb', line 5

def initialize(product)
  Spree::Deprecation.warn('Spree::ProductSummaryPresenter is deprecated and will be removed in Spree 5.5.')
  @product = product
end

Instance Method Details

#callObject



10
11
12
13
14
15
# File 'app/presenters/spree/product_summary_presenter.rb', line 10

def call
  {
    name: @product.name,
    images: images
  }
end