Class: Errgonomic::Result::Err
Defined Under Namespace
Classes: Arbitrary
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#err? ⇒ Boolean
Err is always err.
-
#initialize(value = Arbitrary) ⇒ Err
constructor
Err may be constructed without a value, if you want.
-
#ok? ⇒ Boolean
Err is never ok.
Methods inherited from Any
#==, #and, #and_then, #err_and?, #expect!, #map, #ok_and?, #or, #or_else, #result?, #tap_err, #tap_ok, #unwrap!, #unwrap_err!, #unwrap_or, #unwrap_or_else
Constructor Details
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
283 284 285 |
# File 'lib/errgonomic/result.rb', line 283 def value @value end |
Instance Method Details
#err? ⇒ Boolean
Err is always err
298 299 300 |
# File 'lib/errgonomic/result.rb', line 298 def err? true end |
#ok? ⇒ Boolean
Err is never ok
306 307 308 |
# File 'lib/errgonomic/result.rb', line 306 def ok? false end |