Class: CatalogPathResolver::Result
- Inherits:
-
Data
- Object
- Data
- CatalogPathResolver::Result
- Defined in:
- app/services/catalog_path_resolver.rb
Overview
Service object: result.
Instance Attribute Summary collapse
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#fallback_cms_id ⇒ Object
readonly
Returns the value of attribute fallback_cms_id.
-
#item ⇒ Object
readonly
Returns the value of attribute item.
-
#product_line ⇒ Object
readonly
Returns the value of attribute product_line.
-
#redirect_to ⇒ Object
readonly
Returns the value of attribute redirect_to.
-
#section ⇒ Object
readonly
Returns the value of attribute section.
-
#vpc ⇒ Object
readonly
Returns the value of attribute vpc.
Instance Method Summary collapse
- #cms_fallback? ⇒ Boolean
- #error? ⇒ Boolean
- #faqs? ⇒ Boolean
-
#initialize(product_line: nil, item: nil, vpc: nil, section: nil, redirect_to: nil, fallback_cms_id: nil, error_message: nil) ⇒ Result
constructor
A new instance of Result.
- #item? ⇒ Boolean
- #product_line? ⇒ Boolean
- #redirect? ⇒ Boolean
- #reviews? ⇒ Boolean
- #support? ⇒ Boolean
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.
59 60 61 62 |
# File 'app/services/catalog_path_resolver.rb', line 59 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_message ⇒ Object (readonly)
Returns the value of attribute error_message
50 51 52 |
# File 'app/services/catalog_path_resolver.rb', line 50 def @error_message end |
#fallback_cms_id ⇒ Object (readonly)
Returns the value of attribute fallback_cms_id
50 51 52 |
# File 'app/services/catalog_path_resolver.rb', line 50 def fallback_cms_id @fallback_cms_id end |
#item ⇒ Object (readonly)
Returns the value of attribute item
50 51 52 |
# File 'app/services/catalog_path_resolver.rb', line 50 def item @item end |
#product_line ⇒ Object (readonly)
Returns the value of attribute product_line
50 51 52 |
# File 'app/services/catalog_path_resolver.rb', line 50 def product_line @product_line end |
#redirect_to ⇒ Object (readonly)
Returns the value of attribute redirect_to
50 51 52 |
# File 'app/services/catalog_path_resolver.rb', line 50 def redirect_to @redirect_to end |
#section ⇒ Object (readonly)
Returns the value of attribute section
50 51 52 |
# File 'app/services/catalog_path_resolver.rb', line 50 def section @section end |
#vpc ⇒ Object (readonly)
Returns the value of attribute vpc
50 51 52 |
# File 'app/services/catalog_path_resolver.rb', line 50 def vpc @vpc end |
Instance Method Details
#cms_fallback? ⇒ Boolean
67 |
# File 'app/services/catalog_path_resolver.rb', line 67 def cms_fallback? = fallback_cms_id.present? |
#error? ⇒ Boolean
68 |
# File 'app/services/catalog_path_resolver.rb', line 68 def error? = .present? |
#faqs? ⇒ Boolean
71 |
# File 'app/services/catalog_path_resolver.rb', line 71 def faqs? = section == :faqs |
#item? ⇒ Boolean
65 |
# File 'app/services/catalog_path_resolver.rb', line 65 def item? = item.present? |
#product_line? ⇒ Boolean
64 |
# File 'app/services/catalog_path_resolver.rb', line 64 def product_line? = product_line.present? |
#redirect? ⇒ Boolean
66 |
# File 'app/services/catalog_path_resolver.rb', line 66 def redirect? = redirect_to.present? |
#reviews? ⇒ Boolean
70 |
# File 'app/services/catalog_path_resolver.rb', line 70 def reviews? = section == :reviews |
#support? ⇒ Boolean
69 |
# File 'app/services/catalog_path_resolver.rb', line 69 def support? = section == :support |