Method: Puppet::InfoService::ClassInformationService#classes_per_environment
- Defined in:
- lib/puppet/info_service/class_information_service.rb
#classes_per_environment(env_file_hash) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/puppet/info_service/class_information_service.rb', line 13 def classes_per_environment(env_file_hash) # In this version of puppet there is only one way to parse manifests, as feature switches per environment # are added or removed, this logic needs to change to compute the result per environment with the correct # feature flags in effect. unless env_file_hash.is_a?(Hash) raise ArgumentError, _('Given argument must be a Hash') end result = {} # for each environment # for each file # if file already processed, use last result or error # env_file_hash.each do |env, files| env_result = result[env] = {} files.each do |f| env_result[f] = result_of(f) end end result end |