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, #ok_and?, #or, #or_else, #result?, #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.
226 227 228 |
# File 'lib/errgonomic/result.rb', line 226 def value @value end |
Instance Method Details
#err? ⇒ Boolean
Ok is never err
240 241 242 |
# File 'lib/errgonomic/result.rb', line 240 def err? false end |
#ok? ⇒ Boolean
Ok is always ok
232 233 234 |
# File 'lib/errgonomic/result.rb', line 232 def ok? true end |