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!, #ok_and?, #or, #or_else, #result?, #unwrap!, #unwrap_err!, #unwrap_or, #unwrap_or_else
Constructor Details
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
248 249 250 |
# File 'lib/errgonomic/result.rb', line 248 def value @value end |
Instance Method Details
#err? ⇒ Boolean
Err is always err
263 264 265 |
# File 'lib/errgonomic/result.rb', line 263 def err? true end |
#ok? ⇒ Boolean
Err is never ok
271 272 273 |
# File 'lib/errgonomic/result.rb', line 271 def ok? false end |