Class: HP::Cloud::LbNodes
- Inherits:
-
FogCollection
- Object
- FogCollection
- HP::Cloud::LbNodes
- Defined in:
- lib/hpcloud/lb_nodes.rb
Instance Attribute Summary
Attributes inherited from FogCollection
Instance Method Summary collapse
-
#initialize(load_balancer_id) ⇒ LbNodes
constructor
A new instance of LbNodes.
- #matches(arg, item) ⇒ Object
- #unique(name) ⇒ Object
Methods inherited from FogCollection
#create, #empty?, #filter, #get, #get_array
Constructor Details
#initialize(load_balancer_id) ⇒ LbNodes
Returns a new instance of LbNodes.
27 28 29 30 |
# File 'lib/hpcloud/lb_nodes.rb', line 27 def initialize(load_balancer_id) super("load balancer node") @items = @connection.lb.nodes({:load_balancer_id => load_balancer_id}) end |
Instance Method Details
#matches(arg, item) ⇒ Object
37 38 39 |
# File 'lib/hpcloud/lb_nodes.rb', line 37 def matches(arg, item) return ((arg == item.id.to_s) || (arg == "#{item.address}:#{item.port}")) end |