Module: Zx::Maybe::ClassMethods
- Included in:
- Zx, Zx, Zx::Maybeable, Zx::Maybeable
- Defined in:
- lib/zx/maybe.rb
Constant Summary collapse
- None =
->(value = nil) { Zx::Maybe::None.new(value) }
- Some =
->(*kwargs) { Zx::Maybe::Some.new(*kwargs) }
- Maybe =
->(*kwargs) { Zx::Maybe.of(*kwargs) }
Instance Method Summary collapse
- #Maybe(*kwargs) ⇒ Object
- #None(value = nil) ⇒ Object
- #Some(*kwargs) ⇒ Object
- #Try(default = nil, options = {}) ⇒ Object
Instance Method Details
#Maybe(*kwargs) ⇒ Object
180 181 182 |
# File 'lib/zx/maybe.rb', line 180 def Maybe(*kwargs) Maybe[*kwargs] end |
#None(value = nil) ⇒ Object
188 189 190 |
# File 'lib/zx/maybe.rb', line 188 def None(value = nil) Zx::Maybe.of(value) end |