Class: Errgonomic::Result::Ok
Overview
The Ok variant.
Constant Summary
Constants inherited from Any
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, #as_json, #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 Method Details
#err? ⇒ Boolean
Ok is never err
597 598 599 |
# File 'lib/errgonomic/result.rb', line 597 def err? false end |
#inspect ⇒ Object
Render like Rust's Debug, delegating to the inner value's inspect.
606 607 608 |
# File 'lib/errgonomic/result.rb', line 606 def inspect "Ok(#{value.inspect})" end |
#ok? ⇒ Boolean
Ok is always ok
589 590 591 |
# File 'lib/errgonomic/result.rb', line 589 def ok? true end |