Class: Contai::Providers::Base::Result
- Inherits:
-
Object
- Object
- Contai::Providers::Base::Result
- Defined in:
- lib/contai/providers/base.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
-
#initialize(success:, content: nil, error: nil) ⇒ Result
constructor
A new instance of Result.
- #success? ⇒ Boolean
Constructor Details
#initialize(success:, content: nil, error: nil) ⇒ Result
Returns a new instance of Result.
25 26 27 28 29 |
# File 'lib/contai/providers/base.rb', line 25 def initialize(success:, content: nil, error: nil) @success = success @content = content @error = error end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
23 24 25 |
# File 'lib/contai/providers/base.rb', line 23 def content @content end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
23 24 25 |
# File 'lib/contai/providers/base.rb', line 23 def error @error end |
Instance Method Details
#success? ⇒ Boolean
31 32 33 |
# File 'lib/contai/providers/base.rb', line 31 def success? @success end |