Sha256: 603ee129e17dd4d8eef6be6051bf058823ce5691bcd9492b070515f3c1384bfb
Contents?: true
Size: 518 Bytes
Versions: 1
Compression:
Stored size: 518 Bytes
Contents
require 'AWS' class Ec2Tools::EC2 < AWS::EC2::Base def servers unless @servers @servers = {} describe_instances.reservationSet.item.each do |reservation| reservation.instanceSet.item.each do |instance| if instance.instanceState.name == "running" key = instnacekeyName.to_sym @servers[key] = [] if @servers[key].nil? @servers[key] << instance end end end end @servers end def inspect "#<EC2>" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ec2_tools-0.3.1 | lib/ec2_tools/ec2.rb |