(rubocop) Fix Style/ConditionalAssignment

This commit is contained in:
Tim Sharpe 2019-02-03 15:37:50 +11:00
parent af6dc740e4
commit 426e9ce96b

View file

@ -66,12 +66,7 @@ class Utils
os_types = {}
os_args.each do |arg|
os_arr = arg.split('=')
if os_arr.size == 1
# assume they didn't specify an = sign if split returns 1 size
os_types[os_arr[0]] = 1
else
os_types[os_arr[0]] = os_arr[1].to_i
end
os_types[os_arr[0]] = os_arr.size == 1 ? 1 : os_arr[1].to_i
end
os_types
end