Class: EventMachine::Kannel::Configuration
- Inherits:
-
Object
- Object
- EventMachine::Kannel::Configuration
- Includes:
- Validations
- Defined in:
- lib/em-kannel/configuration.rb
Instance Attribute Summary collapse
-
#dlr_callback_url ⇒ Object
Returns the value of attribute dlr_callback_url.
-
#dlr_mask ⇒ Object
Returns the value of attribute dlr_mask.
-
#password ⇒ Object
Returns the value of attribute password.
-
#smsc ⇒ Object
Returns the value of attribute smsc.
-
#url ⇒ Object
Returns the value of attribute url.
-
#username ⇒ Object
Returns the value of attribute username.
-
#verify_ssl_peer ⇒ Object
Returns the value of attribute verify_ssl_peer.
Instance Method Summary collapse
- #as_query ⇒ Object
-
#initialize(attributes = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Methods included from Validations
#friendly_name, included, #validate!
Constructor Details
#initialize(attributes = {}) ⇒ Configuration
Returns a new instance of Configuration.
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/em-kannel/configuration.rb', line 18 def initialize(attributes={}) attributes = attributes.with_indifferent_access self.username = attributes[:username] self.password = attributes[:password] self.url = attributes[:url] self.dlr_callback_url = attributes[:dlr_callback_url] self.dlr_mask = attributes[:dlr_mask] self.verify_ssl_peer = attributes[:verify_ssl_peer] self.smsc = attributes[:smsc] end |
Instance Attribute Details
#dlr_callback_url ⇒ Object
Returns the value of attribute dlr_callback_url.
6 7 8 |
# File 'lib/em-kannel/configuration.rb', line 6 def dlr_callback_url @dlr_callback_url end |
#dlr_mask ⇒ Object
Returns the value of attribute dlr_mask.
6 7 8 |
# File 'lib/em-kannel/configuration.rb', line 6 def dlr_mask @dlr_mask end |
#password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'lib/em-kannel/configuration.rb', line 6 def password @password end |
#smsc ⇒ Object
Returns the value of attribute smsc.
6 7 8 |
# File 'lib/em-kannel/configuration.rb', line 6 def smsc @smsc end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/em-kannel/configuration.rb', line 6 def url @url end |
#username ⇒ Object
Returns the value of attribute username.
6 7 8 |
# File 'lib/em-kannel/configuration.rb', line 6 def username @username end |
#verify_ssl_peer ⇒ Object
Returns the value of attribute verify_ssl_peer.
6 7 8 |
# File 'lib/em-kannel/configuration.rb', line 6 def verify_ssl_peer @verify_ssl_peer end |
Instance Method Details
#as_query ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/em-kannel/configuration.rb', line 30 def as_query query = { username: username, password: password } query[:"dlr-mask"] = dlr_mask if dlr_mask query[:"dlr-url"] = dlr_callback_url if dlr_callback_url query[:smsc] = smsc if smsc query end |