Class: EngineyardAPI::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/engineyard-api/account.rb

Overview

Users (and API keys) can have access to multiple accounts.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account) ⇒ Account

:nodoc:



12
13
14
15
16
# File 'lib/engineyard-api/account.rb', line 12

def initialize() # :nodoc:
  @id = ['id'] if .has_key? 'id'
  @name = ['name'] if .has_key? 'name'
  @environments = .has_key?(environments) ? ['environments'] : [] 
end

Instance Attribute Details

#environmentsObject (readonly)

Returns a list of environments in an Array



9
10
11
# File 'lib/engineyard-api/account.rb', line 9

def environments
  @environments
end

#idObject (readonly)

Returns account id as an Integer



5
6
7
# File 'lib/engineyard-api/account.rb', line 5

def id
  @id
end

#nameObject (readonly)

Returns Account name as a String



7
8
9
# File 'lib/engineyard-api/account.rb', line 7

def name
  @name
end