Method: Awspec::Generator::Spec::RouteTable#generate_subnet_linespecs

Defined in:
lib/awspec/generator/spec/route_table.rb

#generate_subnet_linespecs(route_table) ⇒ Object



49
50
51
52
53
54
55
56
57
58
# File 'lib/awspec/generator/spec/route_table.rb', line 49

def generate_subnet_linespecs(route_table)
  linespecs = []
  route_table.associations.each do |a|
    next if a.subnet_id.nil?

    subnet = find_subnet(a.subnet_id)
    linespecs.push(ERB.new(route_table_spec_subnet_linetemplate, nil, '-').result(binding)) if subnet
  end
  linespecs
end