mirror of
https://github.com/inspec/inspec
synced 2024-11-14 17:07:09 +00:00
simplify value extraction for apache resource without any magic
This commit is contained in:
parent
03856d6941
commit
0f14ebb1d1
1 changed files with 1 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue