Class: EC2Instance

Inherits:
Hash
  • Object
show all
Defined in:
lib/instant_ec2.rb

Instance Method Summary collapse

Constructor Details

#initialize(h, ec2 = nil) ⇒ EC2Instance

Returns a new instance of EC2Instance.



10
11
12
13
14
15
# File 'lib/instant_ec2.rb', line 10

def initialize(h, ec2=nil)

  @ec2 = ec2
  super().merge!(h)

end

Instance Method Details

#startObject



17
18
19
20
21
# File 'lib/instant_ec2.rb', line 17

def start()

  @ec2.start_instances instance_ids: [self[:instance_id]]

end