Class: UrlsHelper::SalesProductResult

Inherits:
Data
  • Object
show all
Defined in:
app/helpers/urls_helper.rb

Overview


Sales product resolvers: find the best URL + name for a product or
product line. Handles successor items, sales portal ancestor fallback,
and main-product resolution. Used in static pages and product grids
for CTA links and Schema.org collection page markup.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url: nil, name: nil, item_sku: nil) ⇒ SalesProductResult

Returns a new instance of SalesProductResult.



64
# File 'app/helpers/urls_helper.rb', line 64

def initialize(url: nil, name: nil, item_sku: nil) = super

Instance Attribute Details

#item_skuObject (readonly)

Returns the value of attribute item_sku

Returns:

  • (Object)

    the current value of item_sku



63
64
65
# File 'app/helpers/urls_helper.rb', line 63

def item_sku
  @item_sku
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



63
64
65
# File 'app/helpers/urls_helper.rb', line 63

def name
  @name
end

#urlObject (readonly)

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



63
64
65
# File 'app/helpers/urls_helper.rb', line 63

def url
  @url
end