improve code style for parse_config thanks @stevendanna

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
This commit is contained in:
Christoph Hartmann 2016-08-05 12:29:34 +02:00
parent 61eb9cfbd6
commit b3652bf85d

View file

@ -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