Class: SpreeCmCommissioner::Feed::TaxonIncludeProduct
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::Feed::TaxonIncludeProduct
- Includes:
- ActiveModel::Serialization
- Defined in:
- app/services/spree_cm_commissioner/feed/taxon_include_product.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#permalink ⇒ Object
Returns the value of attribute permalink.
-
#pretty_name ⇒ Object
Returns the value of attribute pretty_name.
-
#product_ids ⇒ Object
Returns the value of attribute product_ids.
-
#products ⇒ Object
Returns the value of attribute products.
Instance Method Summary collapse
-
#initialize(taxon:, products:) ⇒ TaxonIncludeProduct
constructor
A new instance of TaxonIncludeProduct.
Constructor Details
#initialize(taxon:, products:) ⇒ TaxonIncludeProduct
Returns a new instance of TaxonIncludeProduct.
8 9 10 11 12 13 14 15 16 17 |
# File 'app/services/spree_cm_commissioner/feed/taxon_include_product.rb', line 8 def initialize(taxon:, products:) @id = taxon.id @name = taxon.name @description = taxon.description @permalink = taxon.permalink @pretty_name = taxon.pretty_name @products = products @product_ids = products.map(&:id) end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/taxon_include_product.rb', line 6 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/taxon_include_product.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/taxon_include_product.rb', line 6 def name @name end |
#permalink ⇒ Object
Returns the value of attribute permalink.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/taxon_include_product.rb', line 6 def permalink @permalink end |
#pretty_name ⇒ Object
Returns the value of attribute pretty_name.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/taxon_include_product.rb', line 6 def pretty_name @pretty_name end |
#product_ids ⇒ Object
Returns the value of attribute product_ids.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/taxon_include_product.rb', line 6 def product_ids @product_ids end |
#products ⇒ Object
Returns the value of attribute products.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/taxon_include_product.rb', line 6 def products @products end |