mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
improve code style for parse_config thanks @stevendanna
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
This commit is contained in:
parent
61eb9cfbd6
commit
b3652bf85d
1 changed files with 5 additions and 4 deletions
|
@ -71,10 +71,11 @@ module Inspec::Resources
|
|||
end
|
||||
|
||||
def read_params
|
||||
return @params if defined?(@params)
|
||||
return @params = {} if content.nil?
|
||||
@params = SimpleConfig.new(content, @opts).params
|
||||
@params
|
||||
@params ||= if content.nil?
|
||||
{}
|
||||
else
|
||||
SimpleConfig.new(content, @opts).params
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue