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
Optionfactory which createsSomeif the argument is notnil, andNoneif 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.
237 238 239 |
# File 'lib/fear/option.rb', line 237 def Option(value) Fear.option(value) end |
#Some(value) ⇒ Fear::Some
255 256 257 |
# File 'lib/fear/option.rb', line 255 def Some(value) Fear.some(value) end |