Class: OpsworksHelpers::OpsworksResource

Inherits:
Object
  • Object
show all
Includes:
OpsworksClient
Defined in:
lib/opsworks_helpers/opsworks_resource.rb

Direct Known Subclasses

App, Deployment, Stack

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource = nil) ⇒ OpsworksResource

Returns a new instance of OpsworksResource.



9
10
11
# File 'lib/opsworks_helpers/opsworks_resource.rb', line 9

def initialize(resource=nil)
  @opsworks_resource = resource
end

Class Method Details

.allObject



5
6
7
# File 'lib/opsworks_helpers/opsworks_resource.rb', line 5

def self.all
  new.all
end

Instance Method Details

#inspectObject



13
14
15
16
17
# File 'lib/opsworks_helpers/opsworks_resource.rb', line 13

def inspect
  string = "#<#{self.class.name}:#{self.object_id} "
  fields = inspect_fields.map{|field| "#{field}: #{self.send(field)}"}
  string << fields.join(", ") << ">"
end

#nameObject



19
20
21
# File 'lib/opsworks_helpers/opsworks_resource.rb', line 19

def name
  opsworks_resource.name
end