Class: Fog::Compute::Terremark::Task
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Terremark::Task
- Defined in:
- lib/fog/compute/terremark/models/task.rb
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Task
constructor
A new instance of Task.
- #ready? ⇒ Boolean
Constructor Details
#initialize(attributes = {}) ⇒ Task
Returns a new instance of Task.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/fog/compute/terremark/models/task.rb', line 15 def initialize(attributes = {}) new_owner = attributes.delete("Owner") new_result = attributes.delete("Result") new_error = attributes.delete("Error") new_cancel_link = attributes.delete("Link") super self.owner = service.parse(new_owner) if new_result self.result = service.parse(new_result) end self.error = service.parse(new_error) if new_error @cancel_link = service.parse(new_cancel_link) if new_cancel_link end |
Instance Method Details
#ready? ⇒ Boolean
30 31 32 |
# File 'lib/fog/compute/terremark/models/task.rb', line 30 def ready? @status == "success" end |