Class: MayamlGetmail::AccountConfig

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

Instance Method Summary collapse

Instance Method Details

#render(mail_account, config = {}) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/mayaml-getmail/account_config.rb', line 24

def render(, config = {})
  ::Mustache.render(
    IO.read(template_file_path),
    type: type(),
    server: .server,
    port: .port,
    user: .user,
    pass: .pass,
    mda_path: config.fetch(:mda_path, "/usr/bin/procmail"),
    read_all: config.fetch(:read_all, "true"),
    delete: config.fetch(:delete, "true"),
    mailboxes: mailboxes()
  )
end