Class: Awsome::Elb::LoadBalancer
- Inherits:
-
Object
- Object
- Awsome::Elb::LoadBalancer
- Defined in:
- lib/awsome/elb/load_balancer.rb
Instance Attribute Summary collapse
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
- #deregister(instance_id) ⇒ Object
-
#initialize(property_hash) ⇒ LoadBalancer
constructor
A new instance of LoadBalancer.
- #instances ⇒ Object
- #name ⇒ Object
- #register(instance_id) ⇒ Object
Constructor Details
#initialize(property_hash) ⇒ LoadBalancer
Returns a new instance of LoadBalancer.
6 7 8 |
# File 'lib/awsome/elb/load_balancer.rb', line 6 def initialize(property_hash) @properties = property_hash.clone end |
Instance Attribute Details
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
4 5 6 |
# File 'lib/awsome/elb/load_balancer.rb', line 4 def properties @properties end |
Instance Method Details
#deregister(instance_id) ⇒ Object
14 15 16 |
# File 'lib/awsome/elb/load_balancer.rb', line 14 def deregister(instance_id) Awsome::Elb.deregister_instance_from_lb(@properties['name'], instance_id) end |
#instances ⇒ Object
10 11 12 |
# File 'lib/awsome/elb/load_balancer.rb', line 10 def instances @properties['instance_ids'].gsub('"', '').split(',').collect(&:strip).to_set end |
#name ⇒ Object
22 23 24 |
# File 'lib/awsome/elb/load_balancer.rb', line 22 def name @properties['name'] end |
#register(instance_id) ⇒ Object
18 19 20 |
# File 'lib/awsome/elb/load_balancer.rb', line 18 def register(instance_id) Awsome::Elb.register_instance_with_lb(@properties['name'], instance_id) end |