class Swa::EC2::Volume

Public Instance Methods

attachment() click to toggle source
# File lib/swa/ec2/volume.rb, line 31
def attachment
  v.attachments.first || OpenStruct.new
end
id() click to toggle source
# File lib/swa/ec2/volume.rb, line 11
def id
  v.volume_id
end
name() click to toggle source
# File lib/swa/ec2/volume.rb, line 27
def name
  tags["Name"]
end
summary() click to toggle source
# File lib/swa/ec2/volume.rb, line 15
def summary
  [
    field(v, :volume_id),
    field(v, :snapshot_id),
    sprintf("%5d", v.size),
    field(v, :volume_type),
    field(attachment, :instance_id),
    pad(attachment.device, 9),
    quoted(name)
  ].join("  ")
end