Class: CatalogPathResolver::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/catalog_path_resolver.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(product_line: nil, item: nil, vpc: nil, section: nil, redirect_to: nil, fallback_cms_id: nil, error_message: nil) ⇒ Result

Returns a new instance of Result.



56
57
58
59
# File 'app/services/catalog_path_resolver.rb', line 56

def initialize(product_line: nil, item: nil, vpc: nil, section: nil,
               redirect_to: nil, fallback_cms_id: nil, error_message: nil)
  super
end

Instance Attribute Details

#error_messageObject (readonly)

Returns the value of attribute error_message

Returns:

  • (Object)

    the current value of error_message



47
48
49
# File 'app/services/catalog_path_resolver.rb', line 47

def error_message
  @error_message
end

#fallback_cms_idObject (readonly)

Returns the value of attribute fallback_cms_id

Returns:

  • (Object)

    the current value of fallback_cms_id



47
48
49
# File 'app/services/catalog_path_resolver.rb', line 47

def fallback_cms_id
  @fallback_cms_id
end

#itemObject (readonly)

Returns the value of attribute item

Returns:

  • (Object)

    the current value of item



47
48
49
# File 'app/services/catalog_path_resolver.rb', line 47

def item
  @item
end

#product_lineObject (readonly)

Returns the value of attribute product_line

Returns:

  • (Object)

    the current value of product_line



47
48
49
# File 'app/services/catalog_path_resolver.rb', line 47

def product_line
  @product_line
end

#redirect_toObject (readonly)

Returns the value of attribute redirect_to

Returns:

  • (Object)

    the current value of redirect_to



47
48
49
# File 'app/services/catalog_path_resolver.rb', line 47

def redirect_to
  @redirect_to
end

#sectionObject (readonly)

Returns the value of attribute section

Returns:

  • (Object)

    the current value of section



47
48
49
# File 'app/services/catalog_path_resolver.rb', line 47

def section
  @section
end

#vpcObject (readonly)

Returns the value of attribute vpc

Returns:

  • (Object)

    the current value of vpc



47
48
49
# File 'app/services/catalog_path_resolver.rb', line 47

def vpc
  @vpc
end

Instance Method Details

#cms_fallback?Boolean

Returns:

  • (Boolean)


64
# File 'app/services/catalog_path_resolver.rb', line 64

def cms_fallback?  = fallback_cms_id.present?

#error?Boolean

Returns:

  • (Boolean)


65
# File 'app/services/catalog_path_resolver.rb', line 65

def error?         = error_message.present?

#faqs?Boolean

Returns:

  • (Boolean)


68
# File 'app/services/catalog_path_resolver.rb', line 68

def faqs?          = section == :faqs

#item?Boolean

Returns:

  • (Boolean)


62
# File 'app/services/catalog_path_resolver.rb', line 62

def item?          = item.present?

#product_line?Boolean

Returns:

  • (Boolean)


61
# File 'app/services/catalog_path_resolver.rb', line 61

def product_line?  = product_line.present?

#redirect?Boolean

Returns:

  • (Boolean)


63
# File 'app/services/catalog_path_resolver.rb', line 63

def redirect?      = redirect_to.present?

#reviews?Boolean

Returns:

  • (Boolean)


67
# File 'app/services/catalog_path_resolver.rb', line 67

def reviews?       = section == :reviews

#support?Boolean

Returns:

  • (Boolean)


66
# File 'app/services/catalog_path_resolver.rb', line 66

def support?       = section == :support