Class: Marathon::DeploymentStep
- Defined in:
- lib/marathon/deployment_step.rb
Overview
This class represents a Marathon Deployment step.
Instance Attribute Summary collapse
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(hash) ⇒ DeploymentStep
constructor
Create a new deployment step object.
- #to_s ⇒ Object
Methods inherited from Base
Methods included from Error
error_class, error_message, from_response
Constructor Details
#initialize(hash) ⇒ DeploymentStep
Create a new deployment step object. hash
: Hash returned by API, including ‘actions’
8 9 10 11 12 13 14 15 |
# File 'lib/marathon/deployment_step.rb', line 8 def initialize(hash) super(hash) if hash.is_a?(Array) @actions = info.map { |e| Marathon::DeploymentAction.new(e) } else @actions = (info[:actions] || []).map { |e| Marathon::DeploymentAction.new(e) } end end |
Instance Attribute Details
#actions ⇒ Object (readonly)
Returns the value of attribute actions.
4 5 6 |
# File 'lib/marathon/deployment_step.rb', line 4 def actions @actions end |
Instance Method Details
#to_s ⇒ Object
17 18 19 |
# File 'lib/marathon/deployment_step.rb', line 17 def to_s "Marathon::DeploymentStep { :actions => #{actions.map { |e| e.to_pretty_s }.join(',')} }" end |