Class: Spree::EasyHomepage::ProductPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenter/spree/easy_homepage/product_presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(product:, main_app:) ⇒ ProductPresenter

Returns a new instance of ProductPresenter.



10
11
12
13
# File 'app/presenter/spree/easy_homepage/product_presenter.rb', line 10

def initialize(product:, main_app:)
  @product = product
  @main_app = main_app
end

Instance Attribute Details

#main_appObject (readonly)

Returns the value of attribute main_app.



8
9
10
# File 'app/presenter/spree/easy_homepage/product_presenter.rb', line 8

def main_app
  @main_app
end

#productObject

Returns the value of attribute product.



7
8
9
# File 'app/presenter/spree/easy_homepage/product_presenter.rb', line 7

def product
  @product
end

Instance Method Details

#parseObject



15
16
17
# File 'app/presenter/spree/easy_homepage/product_presenter.rb', line 15

def parse
  product_attributes
end