Sha256: d65ecd1b6fb15e9e3283dd02e79028696e3a34601fd5a83b80fa0b98b801932b
Contents?: true
Size: 854 Bytes
Versions: 38
Compression:
Stored size: 854 Bytes
Contents
class Jets::Stack class Depends 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.camelize 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.camelize.constantize.output_keys end end end
Version data entries
38 entries across 38 versions & 2 rubygems