Class: Awsom::Vpc
Instance Method Summary collapse
- #created ⇒ Object
- #id ⇒ Object
-
#initialize(name, cidr:) ⇒ Vpc
constructor
A new instance of Vpc.
Methods included from Logger
#debug?, #logger, logger, #stderr, stderr
Constructor Details
#initialize(name, cidr:) ⇒ Vpc
Returns a new instance of Vpc.
8 9 10 11 |
# File 'lib/awsom/vpc.rb', line 8 def initialize(name, cidr:) @name = name @cidr = cidr end |
Instance Method Details
#created ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/awsom/vpc.rb', line 19 def created id = find_id if id vpc = vpc(id) tag(vpc) if not tagged?(vpc) id else create end end |
#id ⇒ Object
13 14 15 16 17 |
# File 'lib/awsom/vpc.rb', line 13 def id id = find_id error "specified vpc #{@name} doesn't exist" if not id id end |