Module: MonadOxide
- Defined in:
- lib/monad-oxide.rb,
lib/ok.rb,
lib/err.rb,
lib/result.rb,
lib/version.rb
Overview
The top level module for the monad-oxide library. Of interest, @see ‘Result’,
Defined Under Namespace
Classes: Err, MonadOxideError, Ok, Result, ResultMethodNotImplementedError, ResultReturnExpectedError, UnwrapError
Constant Summary collapse
- VERSION =
This version is locked to 0.x.0 because semver is a lie and this project uses CICD to push new versions. Any commits that appear on main will result in a new version of the gem created and published.
'0.12.0'
Class Method Summary collapse
-
.err(data) ⇒ Result<A, E=Exception>
Create an ‘Err’ as a conveniece method.
-
.ok(data) ⇒ Result<A, E=Exception>
Create an ‘Ok’ as a conveniece method.
Class Method Details
.err(data) ⇒ Result<A, E=Exception>
Create an ‘Err’ as a conveniece method.
17 18 19 |
# File 'lib/monad-oxide.rb', line 17 def err(data) MonadOxide::Err.new(data) end |
.ok(data) ⇒ Result<A, E=Exception>
Create an ‘Ok’ as a conveniece method.
25 26 27 |
# File 'lib/monad-oxide.rb', line 25 def ok(data) MonadOxide::Ok.new(data) end |