Class: HP::Cloud::Addresses

Inherits:
FogCollection show all
Defined in:
lib/hpcloud/addresses.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

#initializeAddresses

Returns a new instance of Addresses.



28
29
30
31
# File 'lib/hpcloud/addresses.rb', line 28

def initialize()
  super("ip address", "an")
  @items = @connection.compute.addresses
end

Instance Method Details

#create(item = nil) ⇒ Object



33
34
35
# File 'lib/hpcloud/addresses.rb', line 33

def create(item = nil)
  return AddressHelper.new(@connection, item)
end

#matches(arg, item) ⇒ Object



37
38
39
# File 'lib/hpcloud/addresses.rb', line 37

def matches(arg, item)
  return ((arg == item.id.to_s) || (arg == item.ip.to_s))
end