Class: OpenStack::Compute::AddressList

Inherits:
Array
  • Object
show all
Defined in:
lib/openstack/compute/address.rb

Instance Method Summary collapse

Instance Method Details

#[](index) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/openstack/compute/address.rb', line 6

def [](index)
  addresses = Array.new
  if index.class == Symbol then
    self.each do |address|
      if address.label == index.to_s then
        addresses << address
      end
    end
    addresses
  else
    super
  end
end