Class: ElbRemove

Inherits:
ElbCommand show all
Defined in:
lib/maws/commands/elb-remove.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



6
7
8
# File 'lib/maws/commands/elb-remove.rb', line 6

def description
  "elb-remove - remove specified EC2 instances from specified ELBs"
end

#run!Object



10
11
12
13
14
15
# File 'lib/maws/commands/elb-remove.rb', line 10

def run!
  ec2s = instances.specified.with_service(:ec2)
  elbs = instances.specified.with_service(:elb)

  elbs.each {|elb| elb.remove_instances(ec2s)}
end