Class: TTY::Option::Result::Failure Private
- Inherits:
-
TTY::Option::Result
- Object
- TTY::Option::Result
- TTY::Option::Result::Failure
- Defined in:
- lib/tty/option/result.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Failure monad containing an error
Instance Attribute Summary
Attributes inherited from TTY::Option::Result
Instance Method Summary collapse
-
#initialize(error) ⇒ Failure
constructor
private
A new instance of Failure.
Methods inherited from TTY::Option::Result
failure, #failure?, success, #success?
Constructor Details
#initialize(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.
62 63 64 |
# File 'lib/tty/option/result.rb', line 62 def initialize(error) @error = error end |