32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/mayaml.rb', line 32
def self.build_account(raw_account)
MailAccount::Builder.build do |builder|
builder.name raw_account.fetch("name")
builder.default raw_account.fetch("default", "")
builder.realname raw_account.fetch("realname")
builder.type raw_account.fetch("type")
builder.server raw_account.fetch("server")
builder.port raw_account.fetch("port")
builder.user raw_account.fetch("user")
builder.pass raw_account.fetch("pass")
builder.mailboxes raw_account.fetch("mailboxes", [])
builder.smtp_protocol raw_account.fetch("smtp_protocol")
builder.smtp_port raw_account.fetch("smtp_port")
builder.smtp_authenticator raw_account.fetch("smtp_authenticator")
builder.smtp_server raw_account.fetch("smtp_server")
end
end
|