Class: HP::Cloud::Addresses
- Inherits:
-
FogCollection
- Object
- FogCollection
- HP::Cloud::Addresses
- Defined in:
- lib/hpcloud/addresses.rb
Instance Attribute Summary
Attributes inherited from FogCollection
Instance Method Summary collapse
- #create(item = nil) ⇒ Object
-
#initialize ⇒ Addresses
constructor
A new instance of Addresses.
- #matches(arg, item) ⇒ Object
Methods inherited from FogCollection
#empty?, #filter, #get, #get_array, #unique
Constructor Details
#initialize ⇒ Addresses
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 |