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.
215 216 217 |
# File 'lib/fear/option.rb', line 215 def Option(value) Fear.option(value) end |
#Some(value) ⇒ Fear::Some
233 234 235 |
# File 'lib/fear/option.rb', line 233 def Some(value) Fear.some(value) end |