Module: Puppet_X::EnterpriseModules::WebLogic::Settings
- Included in:
- Access
- Defined in:
- lib/puppet_x/enterprisemodules/weblogic/settings.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(parent) ⇒ Object
10 11 12 |
# File 'lib/puppet_x/enterprisemodules/weblogic/settings.rb', line 10 def self.included(parent) parent.extend(Settings) end |
Instance Method Details
#configuration ⇒ Object
18 19 20 |
# File 'lib/puppet_x/enterprisemodules/weblogic/settings.rb', line 18 def configuration read_from_yaml end |
#read_from_yaml ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/puppet_x/enterprisemodules/weblogic/settings.rb', line 26 def read_from_yaml if File.exist?(config_file) # rubocop:disable Security/Open open(config_file) { |f| YAML.safe_load(f, :permitted_classes => [Symbol]) } # rubocop:enable Security/Open else { 'default' => {} } end end |
#setting_for(key) ⇒ Object
14 15 16 |
# File 'lib/puppet_x/enterprisemodules/weblogic/settings.rb', line 14 def setting_for(key) settings[key] end |
#settings ⇒ Object
22 23 24 |
# File 'lib/puppet_x/enterprisemodules/weblogic/settings.rb', line 22 def settings configuration[environment] end |