Class: OperationResult
- Inherits:
-
Object
- Object
- OperationResult
- Defined in:
- lib/bucket_client/operation_result.rb
Instance Method Summary collapse
-
#code ⇒ Integer
HTTP Status code of the operation.
-
#initialize(success, message, value, code) ⇒ OperationResult
constructor
A new instance of OperationResult.
-
#message ⇒ String
Message from the server of the operation.
-
#success ⇒ Boolean
Whether the operation was successful.
-
#value ⇒ Object
Value of the operation result if it has a value.
Constructor Details
#initialize(success, message, value, code) ⇒ OperationResult
Returns a new instance of OperationResult.
3 4 5 6 7 8 |
# File 'lib/bucket_client/operation_result.rb', line 3 def initialize(success, , value, code) @success = success @message = @value = value @code = code end |
Instance Method Details
#code ⇒ Integer
HTTP Status code of the operation.
18 19 20 |
# File 'lib/bucket_client/operation_result.rb', line 18 def code @code end |
#message ⇒ String
Message from the server of the operation. Failure message will be here too
12 13 14 |
# File 'lib/bucket_client/operation_result.rb', line 12 def @message end |
#success ⇒ Boolean
Whether the operation was successful
24 25 26 |
# File 'lib/bucket_client/operation_result.rb', line 24 def success @success end |
#value ⇒ Object
Value of the operation result if it has a value. Can be uri or byte array
30 31 32 |
# File 'lib/bucket_client/operation_result.rb', line 30 def value @value end |