Class: MultiEc2Kiq::Ec2
- Inherits:
-
Object
- Object
- MultiEc2Kiq::Ec2
- Defined in:
- lib/threads/ec2.rb
Instance Method Summary collapse
-
#initialize(id, region) ⇒ Ec2
constructor
A new instance of Ec2.
- #start ⇒ Object
- #start_wait_until_stop ⇒ Object
Constructor Details
#initialize(id, region) ⇒ Ec2
Returns a new instance of Ec2.
7 8 9 10 |
# File 'lib/threads/ec2.rb', line 7 def initialize(id, region) @id = id @region = region end |
Instance Method Details
#start ⇒ Object
12 13 14 15 16 |
# File 'lib/threads/ec2.rb', line 12 def start start_instance true end |
#start_wait_until_stop ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/threads/ec2.rb', line 18 def start_wait_until_stop start dynamodb.started(@id) if dynamodb.wait_until_to_stop(@id) stop_instance dynamodb.stopped(@id) end true end |