Class: OpsWorks::App
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#revision ⇒ Object
Returns the value of attribute revision.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Resource
Constructor Details
This class inherits a constructor from OpsWorks::Resource
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/opsworks/app.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/opsworks/app.rb', line 6 def name @name end |
#revision ⇒ Object
Returns the value of attribute revision.
6 7 8 |
# File 'lib/opsworks/app.rb', line 6 def revision @revision end |
Class Method Details
.from_collection_response(response) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/opsworks/app.rb', line 8 def self.from_collection_response(response) response.data[:apps].map do |hash| revision = hash[:app_source][:revision] if hash[:app_source] new(id: hash[:app_id], name: hash[:name], revision: revision) end end |
Instance Method Details
#deployments ⇒ Object
15 16 17 |
# File 'lib/opsworks/app.rb', line 15 def deployments @deployments ||= initialize_deployments end |
#last_deployment ⇒ Object
19 20 21 |
# File 'lib/opsworks/app.rb', line 19 def last_deployment deployments.find(&:success?) end |