class Mappru::DSL::Context::VPC

Attributes

result[R]

Public Class Methods

new(context, vpc_id, &block) click to toggle source
# File lib/mappru/dsl/context/vpc.rb, line 4
def initialize(context, vpc_id, &block)
  @vpc_id = vpc_id
  @context = context.merge(vpc_id: vpc_id)
  @result = {}
  instance_eval(&block)
end

Private Instance Methods

route_table(name, &block) click to toggle source
# File lib/mappru/dsl/context/vpc.rb, line 15
def route_table(name, &block)
  name = name.to_s

  if @result[name]
    raise "Route Table `#{name}` is already defined"
  end

  @result[name] = Mappru::DSL::Context::VPC::RouteTable.new(@context, @vpc_id, name, &block).result
end