Class: Mayaml::MailAccount
- Inherits:
-
Object
- Object
- Mayaml::MailAccount
- Defined in:
- lib/mayaml/mail_account.rb,
lib/mayaml/mail_account/error.rb,
lib/mayaml/mail_account/builder.rb,
lib/mayaml/mail_account/port_validator.rb,
lib/mayaml/mail_account/type_validator.rb,
lib/mayaml/mail_account/mailboxes_validator.rb,
lib/mayaml/mail_account/default_flag_validator.rb,
lib/mayaml/mail_account/smtp_protocol_validator.rb,
lib/mayaml/mail_account/required_attributes_validator.rb
Defined Under Namespace
Classes: Builder, DefaultFlagValidator, Error, MailboxesValidator, MissingAttributes, PortValidator, RequiredAttributesValidator, SmtpProtocolValidator, TypeValidator, WrongAccountMailboxes, WrongAccountPort, WrongAccountSmtpPort, WrongAccountSmtpProtocol, WrongAccountType, WrongDefaultFlag
Instance Attribute Summary collapse
-
#default ⇒ Object
Returns the value of attribute default.
-
#mailboxes ⇒ Object
Returns the value of attribute mailboxes.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pass ⇒ Object
Returns the value of attribute pass.
-
#port ⇒ Object
Returns the value of attribute port.
-
#realname ⇒ Object
Returns the value of attribute realname.
-
#server ⇒ Object
Returns the value of attribute server.
-
#smtp_authenticator ⇒ Object
Returns the value of attribute smtp_authenticator.
-
#smtp_port ⇒ Object
Returns the value of attribute smtp_port.
-
#smtp_protocol ⇒ Object
Returns the value of attribute smtp_protocol.
-
#smtp_server ⇒ Object
Returns the value of attribute smtp_server.
-
#type ⇒ Object
Returns the value of attribute type.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize ⇒ MailAccount
constructor
A new instance of MailAccount.
- #set_default_flag ⇒ Object
- #set_default_mailboxes ⇒ Object
- #to_str ⇒ Object
Constructor Details
#initialize ⇒ MailAccount
Returns a new instance of MailAccount.
25 26 27 28 |
# File 'lib/mayaml/mail_account.rb', line 25 def initialize set_default_flag set_default_mailboxes end |
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def default @default end |
#mailboxes ⇒ Object
Returns the value of attribute mailboxes.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def mailboxes @mailboxes end |
#name ⇒ Object
Returns the value of attribute name.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def name @name end |
#pass ⇒ Object
Returns the value of attribute pass.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def pass @pass end |
#port ⇒ Object
Returns the value of attribute port.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def port @port end |
#realname ⇒ Object
Returns the value of attribute realname.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def realname @realname end |
#server ⇒ Object
Returns the value of attribute server.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def server @server end |
#smtp_authenticator ⇒ Object
Returns the value of attribute smtp_authenticator.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def smtp_authenticator @smtp_authenticator end |
#smtp_port ⇒ Object
Returns the value of attribute smtp_port.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def smtp_port @smtp_port end |
#smtp_protocol ⇒ Object
Returns the value of attribute smtp_protocol.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def smtp_protocol @smtp_protocol end |
#smtp_server ⇒ Object
Returns the value of attribute smtp_server.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def smtp_server @smtp_server end |
#type ⇒ Object
Returns the value of attribute type.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def type @type end |
#user ⇒ Object
Returns the value of attribute user.
22 23 24 |
# File 'lib/mayaml/mail_account.rb', line 22 def user @user end |
Instance Method Details
#set_default_flag ⇒ Object
30 31 32 |
# File 'lib/mayaml/mail_account.rb', line 30 def set_default_flag @default = false end |
#set_default_mailboxes ⇒ Object
34 35 36 |
# File 'lib/mayaml/mail_account.rb', line 34 def set_default_mailboxes @mailboxes = [] end |
#to_str ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/mayaml/mail_account.rb', line 38 def to_str default_mark = @default ? "*" : "" <<-DESC Account#{default_mark}: #{@name}<#{@realname}> | user: #{@user}:#{@pass} #{@type} - #{@server}:#{@port} [#{@mailboxes.join(",")}] #{@smtp_protocol} - #{@smtp_server}:#{@smtp_port} [auth: #{@smtp_authenticator}] DESC end |