Method: Inspec::Resources::InetdConf#read_params

Defined in:
lib/resources/inetd_conf.rb

#read_paramsObject



37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/resources/inetd_conf.rb', line 37

def read_params
  return @params if defined?(@params)

  # parse the file
  conf = SimpleConfig.new(
    @content,
    assignment_regex: /^\s*(\S+?)\s+(.*?)\s+(.*?)\s+(.*?)\s+(.*?)\s+(.*?)\s+(.*?)\s*$/,
    key_values: 6,
    multiple_values: false,
  )
  @params = conf.params
end