Class: Errgonomic::Result::Ok
Overview
The Ok variant.
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#err? ⇒ Boolean
Ok is never err.
-
#ok? ⇒ Boolean
Ok is always ok.
Methods inherited from Any
#==, #and, #and_then, #err_and?, #expect!, #initialize, #map, #ok_and?, #or, #or_else, #result?, #tap_err, #tap_ok, #unwrap!, #unwrap_err!, #unwrap_or, #unwrap_or_else
Constructor Details
This class inherits a constructor from Errgonomic::Result::Any
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
261 262 263 |
# File 'lib/errgonomic/result.rb', line 261 def value @value end |
Instance Method Details
#err? ⇒ Boolean
Ok is never err
275 276 277 |
# File 'lib/errgonomic/result.rb', line 275 def err? false end |
#ok? ⇒ Boolean
Ok is always ok
267 268 269 |
# File 'lib/errgonomic/result.rb', line 267 def ok? true end |