Class: Errgonomic::Result::Ok
Overview
The Ok variant.
Constant Summary
Constants inherited from Any
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#err? ⇒ Boolean
Ok is never err.
-
#inspect ⇒ Object
Render like Rust's Debug, delegating to the inner value's inspect.
-
#ok? ⇒ Boolean
Ok is always ok.
Methods inherited from Any
#<=>, #==, #and, #and_then, #deconstruct, #eql?, #err_and?, #expect!, #hash, #initialize, #map, #map_err, #method_missing, #ok_and?, #or, #or_else, #pretty_print, #respond_to_missing?, #result?, #tap_err, #tap_ok, #to_json, #to_s, #unwrap!, #unwrap_err!, #unwrap_or, #unwrap_or_else
Constructor Details
This class inherits a constructor from Errgonomic::Result::Any
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Errgonomic::Result::Any
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
404 405 406 |
# File 'lib/errgonomic/result.rb', line 404 def value @value end |
Instance Method Details
#err? ⇒ Boolean
Ok is never err
418 419 420 |
# File 'lib/errgonomic/result.rb', line 418 def err? false end |
#inspect ⇒ Object
Render like Rust's Debug, delegating to the inner value's inspect.
427 428 429 |
# File 'lib/errgonomic/result.rb', line 427 def inspect "Ok(#{value.inspect})" end |
#ok? ⇒ Boolean
Ok is always ok
410 411 412 |
# File 'lib/errgonomic/result.rb', line 410 def ok? true end |