Class: HP::Cloud::Keypairs
- Inherits:
-
FogCollection
- Object
- FogCollection
- HP::Cloud::Keypairs
- Defined in:
- lib/hpcloud/keypairs.rb
Instance Attribute Summary
Attributes inherited from FogCollection
Instance Method Summary collapse
- #create(item = nil) ⇒ Object
-
#initialize ⇒ Keypairs
constructor
A new instance of Keypairs.
- #matches(arg, item) ⇒ Object
Methods inherited from FogCollection
#empty?, #filter, #get, #get_array, #unique
Constructor Details
#initialize ⇒ Keypairs
Returns a new instance of Keypairs.
27 28 29 30 |
# File 'lib/hpcloud/keypairs.rb', line 27 def initialize() super("keypair") @items = @connection.compute.key_pairs end |
Instance Method Details
#create(item = nil) ⇒ Object
32 33 34 |
# File 'lib/hpcloud/keypairs.rb', line 32 def create(item = nil) return KeypairHelper.new(@connection, item) end |
#matches(arg, item) ⇒ Object
36 37 38 |
# File 'lib/hpcloud/keypairs.rb', line 36 def matches(arg, item) return (arg == item.name.to_s) end |