Class: Marathon::DeploymentAction
- Defined in:
- lib/marathon/deployment_action.rb
Overview
This class represents a Marathon Deployment action.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(hash) ⇒ DeploymentAction
constructor
Create a new deployment action object.
- #to_pretty_s ⇒ Object
- #to_s ⇒ Object
- #type ⇒ Object (also: #action)
Methods inherited from Base
Methods included from Error
error_class, error_message, from_response
Constructor Details
#initialize(hash) ⇒ DeploymentAction
Create a new deployment action object. hash
: Hash returned by API, including ‘app’ and ‘type’
6 7 8 |
# File 'lib/marathon/deployment_action.rb', line 6 def initialize(hash) super(hash, %w[app]) end |
Instance Method Details
#to_pretty_s ⇒ Object
16 17 18 |
# File 'lib/marathon/deployment_action.rb', line 16 def to_pretty_s "#{app}/#{type}" end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/marathon/deployment_action.rb', line 20 def to_s "Marathon::DeploymentAction { :app => #{app} :type => #{type} }" end |
#type ⇒ Object Also known as: action
10 11 12 |
# File 'lib/marathon/deployment_action.rb', line 10 def type info[:type] || info[:action] end |