Class: Fog::AWS::Compute::KeyPairs
- Inherits:
-
Collection
- Object
- Array
- Collection
- Fog::AWS::Compute::KeyPairs
- Defined in:
- lib/fog/aws/models/compute/key_pairs.rb
Instance Attribute Summary
Attributes inherited from Collection
Instance Method Summary collapse
- #all(key_name = @key_name) ⇒ Object
- #get(key_name) ⇒ Object
-
#initialize(attributes) ⇒ KeyPairs
constructor
A new instance of KeyPairs.
Methods inherited from Collection
#clear, #create, #inspect, #load, model, #model, #new, #reload, #table, #to_json
Methods included from Fog::Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Fog::Attributes::InstanceMethods
#_dump, #attributes, #identity, #identity=, #merge_attributes, #new_record?, #requires
Constructor Details
#initialize(attributes) ⇒ KeyPairs
Returns a new instance of KeyPairs.
14 15 16 17 |
# File 'lib/fog/aws/models/compute/key_pairs.rb', line 14 def initialize(attributes) @key_name ||= [] super end |
Instance Method Details
#all(key_name = @key_name) ⇒ Object
19 20 21 22 23 |
# File 'lib/fog/aws/models/compute/key_pairs.rb', line 19 def all(key_name = @key_name) @key_name = key_name data = connection.describe_key_pairs(key_name).body load(data['keySet']) end |