module AwsCftTools::TemplateSet::Dependencies
Simple derived information about templates.
Public Instance Methods
each_slice(maximum_slice_size, &block)
click to toggle source
Iterates through the sorted list and yields an array of templates with no unsatisfied dependencies, up to the maximum slice size.
@param maximum_slice_size [Integer] @yield [Array<AwsCftTools::Template>] up to maximum_slice_size
templates with no unsatisfied
dependencies
# File lib/aws_cft_tools/template_set/dependencies.rb, line 41 def each_slice(maximum_slice_size, &block) return unless block_given? # we want to start at the beginning and get up to <n> items for which all prior dependencies have # already been returned in a prior call state = EachSliceState.new(maximum_slice_size, &block) each do |template| state.add_template(template, @dependency_tree.dependencies_for(template.filename.to_s)) end # catch the last templates state.process_slice end
linked(from, to)
click to toggle source
@param from [AwsCftTools::Template] @param to [AwsCftTools::Template]
# File lib/aws_cft_tools/template_set/dependencies.rb, line 29 def linked(from, to) @dependency_tree.linked(from.filename.to_s, to.filename.to_s) end
provided(template, variable)
click to toggle source
@param template [AwsCftTools::Template] @param variable [#to_s]
# File lib/aws_cft_tools/template_set/dependencies.rb, line 14 def provided(template, variable) @dependency_tree.provided(template.filename.to_s, variable.to_s) end
required(template, variable)
click to toggle source
@param template [AwsCftTools::Template] @param variable [#to_s]
# File lib/aws_cft_tools/template_set/dependencies.rb, line 21 def required(template, variable) @dependency_tree.required(template.filename.to_s, variable.to_s) end