Class: HP::Cloud::Keypairs

Inherits:
FogCollection show all
Defined in:
lib/hpcloud/keypairs.rb

Instance Attribute Summary

Attributes inherited from FogCollection

#items, #name

Instance Method Summary collapse

Methods inherited from FogCollection

#empty?, #filter, #get, #get_array, #unique

Constructor Details

#initializeKeypairs

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