Class: TTY::Option::Result::Success 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.

Success monad containing a value

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(value) ⇒ Success

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 Success.



53
54
55
# File 'lib/tty/option/result.rb', line 53

def initialize(value)
  @value = value
end