Class: Resultt::Error
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
- #error? ⇒ Boolean
-
#initialize(error) ⇒ Error
constructor
A new instance of Error.
- #ok? ⇒ Boolean (also: #success?)
Methods included from ResultMethods
Constructor Details
#initialize(error) ⇒ Error
Returns a new instance of Error.
49 50 51 |
# File 'lib/resultt.rb', line 49 def initialize(error) @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
47 48 49 |
# File 'lib/resultt.rb', line 47 def error @error end |
Instance Method Details
#error? ⇒ Boolean
53 54 55 |
# File 'lib/resultt.rb', line 53 def error? true end |
#ok? ⇒ Boolean Also known as: success?
57 58 59 |
# File 'lib/resultt.rb', line 57 def ok? false end |