Module: Convection::DSL::Template::Resource
- Included in:
- Convection::DSL::Template, EC2VPC, Model::Template::Resource
- Defined in:
- lib/convection/model/template.rb,
lib/convection/model/template/resource/aws_ec2_vpc.rb,
lib/convection/model/template/resource/aws_kms_key.rb,
lib/convection/model/template/resource/aws_iam_role.rb,
lib/convection/model/template/resource/aws_iam_user.rb,
lib/convection/model/template/resource/aws_ec2_subnet.rb,
lib/convection/model/template/resource/aws_ec2_network_acl.rb,
lib/convection/model/template/resource/aws_ec2_route_table.rb,
lib/convection/model/template/resource/aws_ec2_security_group.rb,
lib/convection/model/template/resource/aws_ec2_internet_gateway.rb
Overview
Container for DSL interfaces
Defined Under Namespace
Modules: EC2InternetGateway, EC2NetworkACL, EC2RouteTable, EC2SecurityGroup, EC2Subnet, EC2VPC, IAMRole, IAMUser, KmsKey
Class Method Summary collapse
-
.attach_resource(name, klass) ⇒ Object
Wrap private define_method.
Class Method Details
.attach_resource(name, klass) ⇒ Object
Wrap private define_method
19 20 21 22 23 24 25 26 |
# File 'lib/convection/model/template.rb', line 19 def attach_resource(name, klass) define_method(name) do |rname, &block| resource = klass.new(rname, self) resource.instance_exec(&block) if block resources[rname] = resource end end |