Class: Swa::EC2::Vpc

Inherits:
Resource show all
Includes:
TaggedResource
Defined in:
lib/swa/ec2/vpc.rb

Instance Attribute Summary

Attributes inherited from Resource

#aws_resource

Instance Method Summary collapse

Methods included from TaggedResource

#tags

Methods inherited from Resource

#data, delegate, #initialize, list

Constructor Details

This class inherits a constructor from Swa::Resource

Instance Method Details

#default_markerObject



28
29
30
# File 'lib/swa/ec2/vpc.rb', line 28

def default_marker
  "*" if vpc.is_default
end

#idObject



11
12
13
# File 'lib/swa/ec2/vpc.rb', line 11

def id
  vpc.vpc_id
end

#nameObject



24
25
26
# File 'lib/swa/ec2/vpc.rb', line 24

def name
  tags["Name"]
end

#summaryObject



15
16
17
18
19
20
21
22
# File 'lib/swa/ec2/vpc.rb', line 15

def summary
  [
    field(vpc, :vpc_id),
    pad(default_marker, 1),
    field(vpc, :cidr_block),
    quoted(name)
  ].join("  ")
end