Class: Celerb::Result
- Inherits:
-
Object
- Object
- Celerb::Result
- Defined in:
- lib/celerb/result_consumer.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#task_id ⇒ Object
readonly
Returns the value of attribute task_id.
Instance Method Summary collapse
-
#initialize(message) ⇒ Result
constructor
A new instance of Result.
- #success? ⇒ Boolean
Constructor Details
#initialize(message) ⇒ Result
Returns a new instance of Result.
53 54 55 56 57 |
# File 'lib/celerb/result_consumer.rb', line 53 def initialize() @task_id = ['task_id'] @status = ['status'].to_sym @body = ['result'] end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
51 52 53 |
# File 'lib/celerb/result_consumer.rb', line 51 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
50 51 52 |
# File 'lib/celerb/result_consumer.rb', line 50 def status @status end |
#task_id ⇒ Object (readonly)
Returns the value of attribute task_id.
49 50 51 |
# File 'lib/celerb/result_consumer.rb', line 49 def task_id @task_id end |
Instance Method Details
#success? ⇒ Boolean
59 60 61 |
# File 'lib/celerb/result_consumer.rb', line 59 def success? @status == :SUCCESS end |