Class: TTY::Option::Result::Failure Private

Inherits:
TTY::Option::Result show all
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

#error, #value

Instance Method Summary collapse

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