Class: MayamlGetmail::ConfigsGenerator
- Inherits:
-
Object
- Object
- MayamlGetmail::ConfigsGenerator
- Defined in:
- lib/mayaml-getmail/configs_generator.rb
Instance Method Summary collapse
- #generates(accounts) ⇒ Object
-
#initialize(templater) ⇒ ConfigsGenerator
constructor
A new instance of ConfigsGenerator.
Constructor Details
#initialize(templater) ⇒ ConfigsGenerator
Returns a new instance of ConfigsGenerator.
22 23 24 |
# File 'lib/mayaml-getmail/configs_generator.rb', line 22 def initialize(templater) @templater = templater end |
Instance Method Details
#generates(accounts) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/mayaml-getmail/configs_generator.rb', line 26 def generates(accounts) accounts.each_with_object({}) do |mail_account, result| key = mail_account.name.to_sym result[key] = @templater.render(mail_account) result end end |