Class: OpsWorks::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/opsworks/resource.rb

Direct Known Subclasses

App, Deployment, Instance, Layer, Permission, Stack

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, options = {}) ⇒ Resource

Returns a new instance of Resource.



5
6
7
8
9
10
11
# File 'lib/opsworks/resource.rb', line 5

def initialize(client, options = {})
  @client = client

  options.each do |key, value|
    send("#{key}=", value) if respond_to?("#{key}=")
  end
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/opsworks/resource.rb', line 3

def client
  @client
end

Class Method Details

.accountObject



13
14
15
# File 'lib/opsworks/resource.rb', line 13

def self.
  ENV['ACCOUNT'] || @account || 'opsworks-cli'
end