Class: ArticleTechnical::PromoteAttachment::Result
- Inherits:
-
Data
- Object
- Data
- ArticleTechnical::PromoteAttachment::Result
- Defined in:
- app/services/article_technical/promote_attachment.rb
Overview
Immutable outcome of an attachment promotion or relinking attempt.
Instance Attribute Summary collapse
-
#attachment_detached ⇒ Object
readonly
Returns the value of attribute attachment_detached.
-
#content_link ⇒ Object
readonly
Returns the value of attribute content_link.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#publication ⇒ Object
readonly
Returns the value of attribute publication.
-
#publication_created ⇒ Object
readonly
Returns the value of attribute publication_created.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
Instance Method Summary collapse
-
#attachment_detached? ⇒ Boolean
Whether the legacy attachment was detached.
-
#initialize(success: nil, publication: nil, content_link: nil, publication_created: false, attachment_detached: false, errors: []) ⇒ Result
constructor
Creates a normalized service result.
-
#publication_created? ⇒ Boolean
Whether the operation created a Publication.
-
#success? ⇒ Boolean
Whether the operation completed successfully.
Constructor Details
#initialize(success: nil, publication: nil, content_link: nil, publication_created: false, attachment_detached: false, errors: []) ⇒ Result
Creates a normalized service result.
64 65 66 67 68 69 |
# File 'app/services/article_technical/promote_attachment.rb', line 64 def initialize( success: nil, publication: nil, content_link: nil, publication_created: false, attachment_detached: false, errors: [] ) super end |
Instance Attribute Details
#attachment_detached ⇒ Object (readonly)
Returns the value of attribute attachment_detached
48 49 50 |
# File 'app/services/article_technical/promote_attachment.rb', line 48 def @attachment_detached end |
#content_link ⇒ Object (readonly)
Returns the value of attribute content_link
48 49 50 |
# File 'app/services/article_technical/promote_attachment.rb', line 48 def content_link @content_link end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors
48 49 50 |
# File 'app/services/article_technical/promote_attachment.rb', line 48 def errors @errors end |
#publication ⇒ Object (readonly)
Returns the value of attribute publication
48 49 50 |
# File 'app/services/article_technical/promote_attachment.rb', line 48 def publication @publication end |
#publication_created ⇒ Object (readonly)
Returns the value of attribute publication_created
48 49 50 |
# File 'app/services/article_technical/promote_attachment.rb', line 48 def publication_created @publication_created end |
#success ⇒ Object (readonly)
Returns the value of attribute success
48 49 50 |
# File 'app/services/article_technical/promote_attachment.rb', line 48 def success @success end |
Instance Method Details
#attachment_detached? ⇒ Boolean
Returns whether the legacy attachment was detached.
78 |
# File 'app/services/article_technical/promote_attachment.rb', line 78 def = == true |
#publication_created? ⇒ Boolean
Returns whether the operation created a Publication.
75 |
# File 'app/services/article_technical/promote_attachment.rb', line 75 def publication_created? = publication_created == true |
#success? ⇒ Boolean
Returns whether the operation completed successfully.
72 |
# File 'app/services/article_technical/promote_attachment.rb', line 72 def success? = success == true |