Class: Inspec::Resources::XinetdConf

Inherits:
Object
  • Object
show all
Includes:
FileReader, Utils::XinetdParser
Defined in:
lib/inspec/resources/xinetd_conf.rb

Instance Method Summary collapse

Methods included from FileReader

#read_file_content

Methods included from Utils::XinetdParser

#parse_xinetd, #xinetd_include_dir

Constructor Details

#initialize(conf_path = "/etc/xinetd.conf") ⇒ XinetdConf

Returns a new instance of XinetdConf.



23
24
25
26
27
# File 'lib/inspec/resources/xinetd_conf.rb', line 23

def initialize(conf_path = "/etc/xinetd.conf")
  @conf_path = conf_path
  @contents = {}
  read_content(@conf_path)
end

Instance Method Details

#paramsObject



33
34
35
# File 'lib/inspec/resources/xinetd_conf.rb', line 33

def params
  @params ||= read_params
end

#to_sObject



29
30
31
# File 'lib/inspec/resources/xinetd_conf.rb', line 29

def to_s
  "Xinetd config #{@conf_path}#{@filters}"
end