mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
each_with_index makes it more concise
This commit is contained in:
parent
4576b38d66
commit
4bf665b27c
1 changed files with 3 additions and 5 deletions
|
@ -74,11 +74,9 @@ module Fog
|
|||
end
|
||||
|
||||
if tags = options.delete('Tags')
|
||||
i=0
|
||||
tags.each do |key, value|
|
||||
i += 1
|
||||
options["Tags.member.#{i}.Key"] = key.to_s # turns symbol into string
|
||||
options["Tags.member.#{i}.Value"] = value
|
||||
tags.each_with_index do |(key, value), i|
|
||||
options["Tags.member.#{i+1}.Key"] = key.to_s # turns symbol into string
|
||||
options["Tags.member.#{i+1}.Value"] = value
|
||||
end
|
||||
end
|
||||
if termination_policies = options.delete('TerminationPolicies')
|
||||
|
|
Loading…
Add table
Reference in a new issue