Class: Typed::Option
- Inherits:
-
Object
- Object
- Typed::Option
- Extended by:
- T::Generic, T::Helpers, T::Sig
- Defined in:
- lib/typed/option.rb
Overview
A monad representing either a success or a failure. Contains payload and error information as well.
Constant Summary collapse
- Payload =
type_member(:out)
Instance Method Summary collapse
Instance Method Details
#none? ⇒ Boolean
23 24 |
# File 'lib/typed/option.rb', line 23 def none? end |
#payload ⇒ Object
27 28 |
# File 'lib/typed/option.rb', line 27 def payload end |
#payload_or(value) ⇒ Object
36 37 |
# File 'lib/typed/option.rb', line 36 def payload_or(value) end |
#some? ⇒ Boolean
19 20 |
# File 'lib/typed/option.rb', line 19 def some? end |