diff options
Diffstat (limited to 'lib/puppet/util/ini_file.rb')
-rw-r--r-- | lib/puppet/util/ini_file.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/puppet/util/ini_file.rb b/lib/puppet/util/ini_file.rb index 9c78a01..b6927f9 100644 --- a/lib/puppet/util/ini_file.rb +++ b/lib/puppet/util/ini_file.rb @@ -23,6 +23,14 @@ module Util @section_names end + def get_settings(section_name) + section = @sections_hash[section_name] + section.setting_names.inject({}) do |result, setting| + result[setting] = section.get_value(setting) + result + end + end + def get_value(section_name, setting) if (@sections_hash.has_key?(section_name)) @sections_hash[section_name].get_value(setting) |