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/required_attributes_validator.rb
Defined Under Namespace
Classes: Builder, DefaultFlagValidator, Error, MailboxesValidator, MissingAttributes, PortValidator, RequiredAttributesValidator, TypeValidator, WrongAccountMailboxes, WrongAccountPort, 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.
-
#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
24 25 26 27 |
# File 'lib/mayaml/mail_account.rb', line 24 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 |
#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
29 30 31 |
# File 'lib/mayaml/mail_account.rb', line 29 def set_default_flag @default = false end |
#set_default_mailboxes ⇒ Object
33 34 35 |
# File 'lib/mayaml/mail_account.rb', line 33 def set_default_mailboxes @mailboxes = [] end |
#to_str ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/mayaml/mail_account.rb', line 37 def to_str default_mark = @default ? "*" : "" <<-DESC Account#{default_mark}: #{@name}<#{@realname}> | user: #{@user}:#{@pass} #{@type} - #{@server}:#{@port} [#{@mailboxes.join(",")}] DESC end |