class AwsDump::Instance
Public Class Methods
new(parent, instance)
click to toggle source
# File lib/aws_dump/instance.rb, line 5 def initialize(parent, instance) @parent = parent @instance = instance self[:name] = instance.tags["Name"] || instance.id self[:public_ip] = instance.public_ip_address self[:private_ip] = instance.private_ip_address self[:instance_type] = instance.instance_type self[:id] = instance.id self[:image_id] = instance.image_id self[:root_device_type] = instance.root_device_type self[:security_groups] = security_groups end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/aws_dump/instance.rb, line 29 def <=>(other) self[:name] <=> other[:name] end
security_groups()
click to toggle source
# File lib/aws_dump/instance.rb, line 18 def security_groups list = [] @instance.security_groups.each do |security_group| list << { :name => security_group.name, :id => security_group.id } end list end