Class: MayamlGetmail::ConfigsGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/mayaml-getmail/configs_generator.rb

Instance Method Summary collapse

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 |, result|
    key = .name.to_sym
    result[key] = @templater.render()
    result
  end
end