Class: Dry::Types::Result::Failure
- Inherits:
-
Dry::Types::Result
- Object
- Dry::Types::Result
- Dry::Types::Result::Failure
- Defined in:
- lib/dry/types/result.rb
Overview
Failure result
Instance Attribute Summary collapse
- #error ⇒ #to_s readonly
Attributes inherited from Dry::Types::Result
Instance Method Summary collapse
- #failure? ⇒ true
-
#initialize(input, error) ⇒ Failure
constructor
private
A new instance of Failure.
- #success? ⇒ false
- #to_s ⇒ String private
Methods inherited from Dry::Types::Result
Constructor Details
#initialize(input, error) ⇒ Failure
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Failure.
50 51 52 53 |
# File 'lib/dry/types/result.rb', line 50 def initialize(input, error) super(input) @error = error end |
Instance Attribute Details
Instance Method Details
#failure? ⇒ true
68 |
# File 'lib/dry/types/result.rb', line 68 def failure? = true |
#success? ⇒ false
63 |
# File 'lib/dry/types/result.rb', line 63 def success? = false |
#to_s ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
58 |
# File 'lib/dry/types/result.rb', line 58 def to_s = error.to_s |