Class: Stax::Examples::VpcGenerator
- Inherits:
-
Generators::Base
- Object
- Generators::Base
- Stax::Examples::VpcGenerator
- Defined in:
- lib/generators/vpc/vpc_generator.rb
Instance Attribute Summary collapse
-
#cidr_block ⇒ Object
Returns the value of attribute cidr_block.
-
#subnets ⇒ Object
Returns the value of attribute subnets.
Instance Method Summary collapse
Instance Attribute Details
#cidr_block ⇒ Object
Returns the value of attribute cidr_block.
7 8 9 |
# File 'lib/generators/vpc/vpc_generator.rb', line 7 def cidr_block @cidr_block end |
#subnets ⇒ Object
Returns the value of attribute subnets.
7 8 9 |
# File 'lib/generators/vpc/vpc_generator.rb', line 7 def subnets @subnets end |
Instance Method Details
#add_to_staxfile ⇒ Object
17 18 19 |
# File 'lib/generators/vpc/vpc_generator.rb', line 17 def add_to_staxfile append_to_file 'Staxfile', "stack :#{[:stack]}" end |
#create_vpc_files ⇒ Object
11 12 13 14 15 |
# File 'lib/generators/vpc/vpc_generator.rb', line 11 def create_vpc_files @cidr_block = ask('cidr block for vpc?', default: '10.0.0.0/16') @subnets = ask('number of subnets to create?', default: '3') directory '.', 'cf' end |