simplify value extraction for apache resource without any magic

This commit is contained in:
Christoph Hartmann 2016-02-09 15:28:10 +01:00 committed by Dominik Richter
parent 03856d6941
commit 0f14ebb1d1

View file

@ -45,11 +45,7 @@ class ApacheConf < Inspec.resource(1)
@params || read_content
# extract values
param = @params[name.to_s]
return nil if param.nil?
# extract first value if we have only one value in array
return param[0] if param.length == 1
param
@params[name.to_s] unless @params.nil?
end
def filter_comments(data)