Class: Faq::Update::Result
- Inherits:
-
Data
- Object
- Data
- Faq::Update::Result
- Defined in:
- app/services/faq/update.rb
Overview
Immutable result of an FAQ update operation.
Instance Attribute Summary collapse
-
#added_page_paths ⇒ Object
readonly
Returns the value of attribute added_page_paths.
-
#added_tags ⇒ Object
readonly
Returns the value of attribute added_tags.
-
#cache_purged ⇒ Object
readonly
Returns the value of attribute cache_purged.
-
#changed_fields ⇒ Object
readonly
Returns the value of attribute changed_fields.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#faq ⇒ Object
readonly
Returns the value of attribute faq.
-
#refreshed_posts ⇒ Object
readonly
Returns the value of attribute refreshed_posts.
-
#removed_page_paths ⇒ Object
readonly
Returns the value of attribute removed_page_paths.
-
#removed_tags ⇒ Object
readonly
Returns the value of attribute removed_tags.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(success: nil, faq: nil, changed_fields: [], added_tags: [], removed_tags: [], added_page_paths: [], removed_page_paths: [], refreshed_posts: [], cache_purged: false, warnings: [], error: nil) ⇒ Result
constructor
Mirrors the result members one-for-one; grouping these into a loose Hash would hide the service contract.
-
#success? ⇒ Boolean
Check whether the update completed successfully.
Constructor Details
#initialize(success: nil, faq: nil, changed_fields: [], added_tags: [], removed_tags: [], added_page_paths: [], removed_page_paths: [], refreshed_posts: [], cache_purged: false, warnings: [], error: nil) ⇒ Result
Mirrors the result members one-for-one; grouping these into a loose Hash
would hide the service contract.
rubocop:disable Metrics/ParameterLists
58 59 60 61 62 |
# File 'app/services/faq/update.rb', line 58 def initialize(success: nil, faq: nil, changed_fields: [], added_tags: [], removed_tags: [], added_page_paths: [], removed_page_paths: [], refreshed_posts: [], cache_purged: false, warnings: [], error: nil) super end |
Instance Attribute Details
#added_page_paths ⇒ Object (readonly)
Returns the value of attribute added_page_paths
30 31 32 |
# File 'app/services/faq/update.rb', line 30 def added_page_paths @added_page_paths end |
#added_tags ⇒ Object (readonly)
Returns the value of attribute added_tags
30 31 32 |
# File 'app/services/faq/update.rb', line 30 def @added_tags end |
#cache_purged ⇒ Object (readonly)
Returns the value of attribute cache_purged
30 31 32 |
# File 'app/services/faq/update.rb', line 30 def cache_purged @cache_purged end |
#changed_fields ⇒ Object (readonly)
Returns the value of attribute changed_fields
30 31 32 |
# File 'app/services/faq/update.rb', line 30 def changed_fields @changed_fields end |
#error ⇒ Object (readonly)
Returns the value of attribute error
30 31 32 |
# File 'app/services/faq/update.rb', line 30 def error @error end |
#faq ⇒ Object (readonly)
Returns the value of attribute faq
30 31 32 |
# File 'app/services/faq/update.rb', line 30 def faq @faq end |
#refreshed_posts ⇒ Object (readonly)
Returns the value of attribute refreshed_posts
30 31 32 |
# File 'app/services/faq/update.rb', line 30 def refreshed_posts @refreshed_posts end |
#removed_page_paths ⇒ Object (readonly)
Returns the value of attribute removed_page_paths
30 31 32 |
# File 'app/services/faq/update.rb', line 30 def removed_page_paths @removed_page_paths end |
#removed_tags ⇒ Object (readonly)
Returns the value of attribute removed_tags
30 31 32 |
# File 'app/services/faq/update.rb', line 30 def @removed_tags end |
#success ⇒ Object (readonly)
Returns the value of attribute success
30 31 32 |
# File 'app/services/faq/update.rb', line 30 def success @success end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings
30 31 32 |
# File 'app/services/faq/update.rb', line 30 def warnings @warnings end |
Instance Method Details
#success? ⇒ Boolean
Check whether the update completed successfully.
68 |
# File 'app/services/faq/update.rb', line 68 def success? = success == true |