Sha256: 2a643d8944fbcfd88a74f277f705cd9ad39a8b56340c466695467ae9aaff7952

Contents?: true

Size: 695 Bytes

Versions: 8

Compression:

Stored size: 695 Bytes

Contents

module Lono::Configset::Strategy
  class Dsl < Base
    include Helpers
    include Syntax

    def initialize(options={})
      super
      @structure = {} # holds in memory the configset hash structure
      @current = "main" # current configset
      @tracked = []
    end

    def find_evaluation_path
      "#{@root}/lib/configset.rb"
    end

    def load
      evaluate_file(@evaluation_path)
      configsets = @configsets || @tracked.uniq
      configsets = ["main"] if configsets.empty?
      init = {"configSets" => {"default" => configsets}}.merge(@structure)
      full_structure = { "AWS::CloudFormation::Init" => init }
      full_structure.deep_stringify_keys!
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lono-7.3.2 lib/lono/configset/strategy/dsl.rb
lono-7.3.1 lib/lono/configset/strategy/dsl.rb
lono-7.3.0 lib/lono/configset/strategy/dsl.rb
lono-7.2.3 lib/lono/configset/strategy/dsl.rb
lono-7.2.2 lib/lono/configset/strategy/dsl.rb
lono-7.2.1 lib/lono/configset/strategy/dsl.rb
lono-7.2.0 lib/lono/configset/strategy/dsl.rb
lono-7.1.0 lib/lono/configset/strategy/dsl.rb