class Inspec::Resources::AuditDaemonConf
Attributes
conf_path[R]
content[R]
params[R]
Public Class Methods
new(path = nil)
click to toggle source
# File lib/inspec/resources/auditd_conf.rb, line 21 def initialize(path = nil) @conf_path = path || "/etc/audit/auditd.conf" @content = read_file_content(@conf_path) end
Public Instance Methods
method_missing(name)
click to toggle source
# File lib/inspec/resources/auditd_conf.rb, line 26 def method_missing(name) read_params[name.to_s] end
to_s()
click to toggle source
# File lib/inspec/resources/auditd_conf.rb, line 30 def to_s "Audit Daemon Config" end
Private Instance Methods
read_params()
click to toggle source
# File lib/inspec/resources/auditd_conf.rb, line 36 def read_params return @params if defined?(@params) # parse the file conf = SimpleConfig.new( @content, multiple_values: false ) @params = conf.params end