Class: CatalogPathResolver::Result
- Inherits:
-
Data
- Object
- Data
- CatalogPathResolver::Result
- Defined in:
- app/services/catalog_path_resolver.rb
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.
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_message ⇒ Object (readonly)
Returns the value of attribute error_message
47 48 49 |
# File 'app/services/catalog_path_resolver.rb', line 47 def @error_message end |
#fallback_cms_id ⇒ Object (readonly)
Returns the value of attribute fallback_cms_id
47 48 49 |
# File 'app/services/catalog_path_resolver.rb', line 47 def fallback_cms_id @fallback_cms_id end |
#item ⇒ Object (readonly)
Returns the value of attribute item
47 48 49 |
# File 'app/services/catalog_path_resolver.rb', line 47 def item @item end |
#product_line ⇒ Object (readonly)
Returns the value of attribute product_line
47 48 49 |
# File 'app/services/catalog_path_resolver.rb', line 47 def product_line @product_line end |
#redirect_to ⇒ Object (readonly)
Returns the value of attribute redirect_to
47 48 49 |
# File 'app/services/catalog_path_resolver.rb', line 47 def redirect_to @redirect_to end |
#section ⇒ Object (readonly)
Returns the value of attribute section
47 48 49 |
# File 'app/services/catalog_path_resolver.rb', line 47 def section @section end |
#vpc ⇒ Object (readonly)
Returns the value of attribute vpc
47 48 49 |
# File 'app/services/catalog_path_resolver.rb', line 47 def vpc @vpc end |
Instance Method Details
#cms_fallback? ⇒ Boolean
64 |
# File 'app/services/catalog_path_resolver.rb', line 64 def cms_fallback? = fallback_cms_id.present? |
#error? ⇒ Boolean
65 |
# File 'app/services/catalog_path_resolver.rb', line 65 def error? = .present? |
#faqs? ⇒ Boolean
68 |
# File 'app/services/catalog_path_resolver.rb', line 68 def faqs? = section == :faqs |
#item? ⇒ Boolean
62 |
# File 'app/services/catalog_path_resolver.rb', line 62 def item? = item.present? |
#product_line? ⇒ Boolean
61 |
# File 'app/services/catalog_path_resolver.rb', line 61 def product_line? = product_line.present? |
#redirect? ⇒ Boolean
63 |
# File 'app/services/catalog_path_resolver.rb', line 63 def redirect? = redirect_to.present? |
#reviews? ⇒ Boolean
67 |
# File 'app/services/catalog_path_resolver.rb', line 67 def reviews? = section == :reviews |
#support? ⇒ Boolean
66 |
# File 'app/services/catalog_path_resolver.rb', line 66 def support? = section == :support |