Class: MailRoom::Delivery::Postback::Options
- Inherits:
-
Struct
- Object
- Struct
- MailRoom::Delivery::Postback::Options
- Defined in:
- lib/mail_room/delivery/postback.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#password ⇒ Object
Returns the value of attribute password.
-
#token ⇒ Object
Returns the value of attribute token.
-
#url ⇒ Object
Returns the value of attribute url.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #basic_auth? ⇒ Boolean
-
#initialize(mailbox) ⇒ Options
constructor
A new instance of Options.
- #token_auth? ⇒ Boolean
Constructor Details
#initialize(mailbox) ⇒ Options
Returns a new instance of Options.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/mail_room/delivery/postback.rb', line 9 def initialize(mailbox) url = mailbox.delivery_url || mailbox.[:delivery_url] || mailbox.[:url] token = mailbox.delivery_token || mailbox.[:delivery_token] || mailbox.[:token] username = mailbox.[:username] password = mailbox.[:password] logger = mailbox.logger super(url, token, username, password, logger) end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger
8 9 10 |
# File 'lib/mail_room/delivery/postback.rb', line 8 def logger @logger end |
#password ⇒ Object
Returns the value of attribute password
8 9 10 |
# File 'lib/mail_room/delivery/postback.rb', line 8 def password @password end |
#token ⇒ Object
Returns the value of attribute token
8 9 10 |
# File 'lib/mail_room/delivery/postback.rb', line 8 def token @token end |
#url ⇒ Object
Returns the value of attribute url
8 9 10 |
# File 'lib/mail_room/delivery/postback.rb', line 8 def url @url end |
#username ⇒ Object
Returns the value of attribute username
8 9 10 |
# File 'lib/mail_room/delivery/postback.rb', line 8 def username @username end |
Instance Method Details
#basic_auth? ⇒ Boolean
32 33 34 |
# File 'lib/mail_room/delivery/postback.rb', line 32 def basic_auth? !self[:username].nil? && !self[:password].nil? end |
#token_auth? ⇒ Boolean
28 29 30 |
# File 'lib/mail_room/delivery/postback.rb', line 28 def token_auth? !self[:token].nil? end |