Class: EngineyardAPI::App
- Inherits:
-
Object
- Object
- EngineyardAPI::App
- Defined in:
- lib/engineyard-api/app.rb
Overview
Class to store application information
Instance Method Summary collapse
-
#[](key) ⇒ Object
:nodoc:.
-
#account_id ⇒ Object
Return account id as integer.
-
#account_name ⇒ Object
Return account nam eas string.
-
#app_id ⇒ Object
Returns application id in form of an integer.
-
#app_type ⇒ Object
Returns type of application.
-
#initialize(app) ⇒ App
constructor
:nodoc:.
-
#last_deploy ⇒ Object
:nodoc:.
-
#last_deploy=(deployment) ⇒ Object
:nodoc:.
-
#name ⇒ Object
Return account name as string.
-
#repository ⇒ Object
Return repository associated to application.
-
#zone ⇒ Object
:nodoc:.
Constructor Details
#initialize(app) ⇒ App
:nodoc:
6 7 8 |
# File 'lib/engineyard-api/app.rb', line 6 def initialize(app) # :nodoc: @app=app end |
Instance Method Details
#[](key) ⇒ Object
:nodoc:
40 41 42 |
# File 'lib/engineyard-api/app.rb', line 40 def [](key) # :nodoc: @app['key'] end |
#account_id ⇒ Object
Return account id as integer
31 32 33 |
# File 'lib/engineyard-api/app.rb', line 31 def account_id @app['account']['id'] end |
#account_name ⇒ Object
Return account nam eas string
36 37 38 |
# File 'lib/engineyard-api/app.rb', line 36 def account_name @app['account']['name'] end |
#app_id ⇒ Object
Returns application id in form of an integer
11 12 13 |
# File 'lib/engineyard-api/app.rb', line 11 def app_id @app['id'] end |
#app_type ⇒ Object
Returns type of application
26 27 28 |
# File 'lib/engineyard-api/app.rb', line 26 def app_type @app['app_type_id'] end |
#last_deploy ⇒ Object
:nodoc:
52 53 54 |
# File 'lib/engineyard-api/app.rb', line 52 def last_deploy # :nodoc: @last_deploy end |
#last_deploy=(deployment) ⇒ Object
:nodoc:
48 49 50 |
# File 'lib/engineyard-api/app.rb', line 48 def last_deploy=(deployment) # :nodoc: @last_deploy=deployment end |
#name ⇒ Object
Return account name as string
16 17 18 |
# File 'lib/engineyard-api/app.rb', line 16 def name @app['name'] end |
#repository ⇒ Object
Return repository associated to application
21 22 23 |
# File 'lib/engineyard-api/app.rb', line 21 def repository @app['repository_uri'] end |
#zone ⇒ Object
:nodoc:
44 45 46 |
# File 'lib/engineyard-api/app.rb', line 44 def zone # :nodoc: @app['availability_zone'] end |