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

Version Path
jets-2.1.5 lib/jets/stack/depends.rb
jets-2.1.4 lib/jets/stack/depends.rb
jets-2.1.3 lib/jets/stack/depends.rb
jets-2.1.2 lib/jets/stack/depends.rb
jets_bb_fork-0.0.4 lib/jets/stack/depends.rb
jets-2.1.1 lib/jets/stack/depends.rb
jets-2.1.0 lib/jets/stack/depends.rb
jets-2.0.6 lib/jets/stack/depends.rb
jets-2.0.5 lib/jets/stack/depends.rb
jets-2.0.4 lib/jets/stack/depends.rb
jets-2.0.3 lib/jets/stack/depends.rb
jets-2.0.1 lib/jets/stack/depends.rb
jets-2.0.0 lib/jets/stack/depends.rb
jets-1.9.32 lib/jets/stack/depends.rb
jets-1.9.31 lib/jets/stack/depends.rb
jets-1.9.30 lib/jets/stack/depends.rb
jets-1.9.29 lib/jets/stack/depends.rb
jets-1.9.28 lib/jets/stack/depends.rb
jets-1.9.27 lib/jets/stack/depends.rb
jets-1.9.26 lib/jets/stack/depends.rb