Class: Fog::AWS::EC2::SecurityGroups
- Inherits:
-
Collection
- Object
- Array
- Collection
- Fog::AWS::EC2::SecurityGroups
- Defined in:
- lib/fog/aws/models/ec2/security_groups.rb
Instance Attribute Summary
Attributes inherited from Collection
Instance Method Summary collapse
- #all(group_name = @group_name) ⇒ Object
- #get(group_name) ⇒ Object
-
#initialize(attributes) ⇒ SecurityGroups
constructor
A new instance of SecurityGroups.
Methods inherited from Collection
#create, #inspect, #load, model, #model, #new, #reload, #table, #to_json
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #identity, #identity=, #merge_attributes, #new_record?, #requires
Constructor Details
#initialize(attributes) ⇒ SecurityGroups
Returns a new instance of SecurityGroups.
26 27 28 29 |
# File 'lib/fog/aws/models/ec2/security_groups.rb', line 26 def initialize(attributes) @group_name ||= [] super end |
Instance Method Details
#all(group_name = @group_name) ⇒ Object
31 32 33 34 35 |
# File 'lib/fog/aws/models/ec2/security_groups.rb', line 31 def all(group_name = @group_name) @group_name = group_name data = connection.describe_security_groups(group_name).body load(data['securityGroupInfo']) end |