Class: HP::Cloud::Networks
- Inherits:
-
FogCollection
- Object
- FogCollection
- HP::Cloud::Networks
- Defined in:
- lib/hpcloud/networks.rb
Instance Attribute Summary
Attributes inherited from FogCollection
Instance Method Summary collapse
- #create(item = nil) ⇒ Object
- #external ⇒ Object
-
#initialize ⇒ Networks
constructor
A new instance of Networks.
Methods inherited from FogCollection
#empty?, #filter, #get, #get_array, #matches, #unique
Constructor Details
#initialize ⇒ Networks
Returns a new instance of Networks.
28 29 30 31 |
# File 'lib/hpcloud/networks.rb', line 28 def initialize super("network") @items = @connection.network.networks end |
Instance Method Details
#create(item = nil) ⇒ Object
33 34 35 |
# File 'lib/hpcloud/networks.rb', line 33 def create(item = nil) return NetworkHelper.new(@connection, item) end |
#external ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/hpcloud/networks.rb', line 37 def external @items.each{ |n| if n.router_external == true return create(n) end } return nil end |