Sha256: c51f294658a9aa67206fe08da3cf88b4e84f20b27f138332050779dd70e852ff
Contents?: true
Size: 901 Bytes
Versions: 20
Compression:
Stored size: 901 Bytes
Contents
class Jets::Stack class Depends autoload :Item, "jets/stack/depends/item" def initialize(items) @items = items end def params result = {} @items.each do |item| logical_id = item.stack.to_s.camelize # logical_id dependency_outputs(logical_id).each do |output| dependency_class = logical_id.to_s.classify output_key = item.options[:class_prefix] ? "#{dependency_class}#{output}" : # already camelized output output_value = "!GetAtt #{dependency_class}.Outputs.#{output}" result[output_key] = output_value end end result end def stack_list @items.map do |item| item.stack.to_s.camelize # logical_id # logical_id end end def dependency_outputs(logical_id) logical_id.to_s.classify.constantize.output_keys end end end
Version data entries
20 entries across 20 versions & 1 rubygems