lib/jets/cfn/builders/interface.rb in jets-0.8.18 vs lib/jets/cfn/builders/interface.rb in jets-0.9.0

- old
+ new

@@ -5,13 +5,12 @@ class Jets::Cfn::Builders module Interface extend Memoist def build - # Do not bother building - # or writing the template unless there are functions defined - return if @app_klass && !@app_klass.build? + # Do not bother building or writing the template unless there are functions defined + return if @app_class && !@app_class.build? compose # must be implemented by subclass write end @@ -72,12 +71,12 @@ @template[:Outputs] ||= {} @template[:Outputs][name.camelize] = options end def add_resources - @app_klass.tasks.each do |task| - task.resources.each do |definition| - resource = Jets::Resource.new(definition, task.replacements) + @app_class.tasks.each do |task| + task.associated_resources.each do |associated| + resource = Jets::Resource.new(associated.definition, task.replacements) add_resource(resource) add_resource(resource.permission) end end end