Method: CM::Plugin::Plan#init_tokens

Defined in:
lib/core/plugin/plan.rb

#init_tokensObject




41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/core/plugin/plan.rb', line 41

def init_tokens
  collect_tokens = lambda do |local_settings, token|
    local_settings.each do |name, value|
      setting_token = [ array(token), name ].flatten

      if value.is_a?(Hash)
        collect_tokens.call(value, setting_token)
      else
        token_base = setting_token.shift
        set_token(token_base, setting_token, value)
      end
    end
  end

  # Generate config tokens
  collect_tokens.call(manifest_config, 'config')
end