Module: PuppetX::EnterpriseModules::Oracle::AuditProperty::ClassMethods
- Defined in:
- lib/puppet_x/enterprisemodules/oracle/audit_property.rb
Overview
rubocop:disable Style/Documentation
Instance Method Summary collapse
-
#entry(element = nil) ⇒ Object
rubocop:enable Style/Documentation.
- #translate_to_resource(raw_resource) ⇒ Object
- #value_for(value) ⇒ Object
Instance Method Details
#entry(element = nil) ⇒ Object
rubocop:enable Style/Documentation
42 43 44 45 46 47 48 |
# File 'lib/puppet_x/enterprisemodules/oracle/audit_property.rb', line 42 def entry(element = nil) if element @entry = element else @entry end end |
#translate_to_resource(raw_resource) ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/puppet_x/enterprisemodules/oracle/audit_property.rb', line 63 def translate_to_resource(raw_resource) success, failure = raw_resource[entry].split('/') case name.to_s when /.*_failure/ value_for(failure) when /.*_success/ value_for(success) else fail "#{name} is invalid here" end end |
#value_for(value) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/puppet_x/enterprisemodules/oracle/audit_property.rb', line 50 def value_for(value) case value when 'A' 'by_access' when 'S' 'by_session' when '-' 'none' else fail "#{value} is invalid here" end end |