Module: Fear::Option::Mixin
- Included in:
- Mixin
- Defined in:
- lib/fear/option.rb
Overview
Include this mixin to access convenient factory methods.
Instance Method Summary collapse
- #None ⇒ None
-
#Option(value) ⇒ Fear::Some, Fear::None
An
Option
factory which createsSome
if the argument is notnil
, andNone
if it isnil
. - #Some(value) ⇒ Fear::Some
Instance Method Details
#Option(value) ⇒ Fear::Some, Fear::None
An Option
factory which creates Some
if the argument is not nil
, and None
if it is nil
.
213 214 215 |
# File 'lib/fear/option.rb', line 213 def Option(value) Fear.option(value) end |
#Some(value) ⇒ Fear::Some
231 232 233 |
# File 'lib/fear/option.rb', line 231 def Some(value) Fear.some(value) end |