Class: ArticleTechnical::Consolidator::Result
- Inherits:
-
Data
- Object
- Data
- ArticleTechnical::Consolidator::Result
- Defined in:
- app/services/article_technical/consolidator.rb
Overview
Immutable outcome of a consolidation attempt.
Instance Attribute Summary collapse
-
#article ⇒ Object
readonly
Returns the value of attribute article.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
Instance Method Summary collapse
-
#initialize(success:, article: nil, errors: []) ⇒ Result
constructor
Creates a normalized result.
-
#success? ⇒ Boolean
Whether a draft was created.
Constructor Details
#initialize(success:, article: nil, errors: []) ⇒ Result
Creates a normalized result.
30 31 32 |
# File 'app/services/article_technical/consolidator.rb', line 30 def initialize(success:, article: nil, errors: []) super end |
Instance Attribute Details
#article ⇒ Object (readonly)
Returns the value of attribute article
24 25 26 |
# File 'app/services/article_technical/consolidator.rb', line 24 def article @article end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors
24 25 26 |
# File 'app/services/article_technical/consolidator.rb', line 24 def errors @errors end |
#success ⇒ Object (readonly)
Returns the value of attribute success
24 25 26 |
# File 'app/services/article_technical/consolidator.rb', line 24 def success @success end |
Instance Method Details
#success? ⇒ Boolean
Returns whether a draft was created.
35 |
# File 'app/services/article_technical/consolidator.rb', line 35 def success? = success == true |