lib/mayaml-mutt/configs_generator.rb in mayaml-mutt-4.0.3 vs lib/mayaml-mutt/configs_generator.rb in mayaml-mutt-4.1.0
- old
+ new
@@ -25,13 +25,13 @@
@creds_templater = creds_templater
end
def generates_init(accounts)
alternates = []
- accounts.each_with_object({}) do |mail_account, result|
+ accounts.each_with_object({}).with_index do |(mail_account, result), index|
key = mail_account.name.to_sym
alternates << mail_account.name
- result[key] = @init_templater.render(mail_account)
+ result[key] = @init_templater.render(mail_account, index)
result[:alternates] = @alternates_templater.render(alternates)
result
end
end