Class: Mutations::Outcome
- Inherits:
-
Object
- Object
- Mutations::Outcome
- Defined in:
- lib/mutations/outcome.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#inputs ⇒ Object
readonly
Returns the value of attribute inputs.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(is_success, result, errors, inputs) ⇒ Outcome
constructor
A new instance of Outcome.
- #success? ⇒ Boolean
Constructor Details
#initialize(is_success, result, errors, inputs) ⇒ Outcome
Returns a new instance of Outcome.
5 6 7 |
# File 'lib/mutations/outcome.rb', line 5 def initialize(is_success, result, errors, inputs) @success, @result, @errors, @inputs = is_success, result, errors, inputs end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
3 4 5 |
# File 'lib/mutations/outcome.rb', line 3 def errors @errors end |
#inputs ⇒ Object (readonly)
Returns the value of attribute inputs.
3 4 5 |
# File 'lib/mutations/outcome.rb', line 3 def inputs @inputs end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
3 4 5 |
# File 'lib/mutations/outcome.rb', line 3 def result @result end |
Instance Method Details
#success? ⇒ Boolean
9 10 11 |
# File 'lib/mutations/outcome.rb', line 9 def success? @success end |