Class: KannelRails::Config
- Inherits:
-
Object
- Object
- KannelRails::Config
- Defined in:
- lib/kannel_rails/config.rb
Instance Attribute Summary collapse
-
#api_secret ⇒ Object
Returns the value of attribute api_secret.
-
#dlr_mask ⇒ Object
Returns the value of attribute dlr_mask.
-
#dlr_url ⇒ Object
Returns the value of attribute dlr_url.
-
#kannel_url ⇒ Object
Returns the value of attribute kannel_url.
-
#password ⇒ Object
Returns the value of attribute password.
-
#sendsms_port ⇒ Object
Returns the value of attribute sendsms_port.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(config_hash = {}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(config_hash = {}) ⇒ Config
Returns a new instance of Config.
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/kannel_rails/config.rb', line 16 def initialize(config_hash = {}) url = config_hash['kannel_url'] self.kannel_url = url.is_a?(URI) ? url : URI.parse(url) self.sendsms_port = config_hash['sendsms_port'] self.username = config_hash['username'] self.password = config_hash['password'] self.dlr_url = config_hash['dlr_url'] self.dlr_mask = config_hash['dlr_mask'] self.api_secret = config_hash['api_secret'] end |
Instance Attribute Details
#api_secret ⇒ Object
Returns the value of attribute api_secret.
14 15 16 |
# File 'lib/kannel_rails/config.rb', line 14 def api_secret @api_secret end |
#dlr_mask ⇒ Object
Returns the value of attribute dlr_mask.
12 13 14 |
# File 'lib/kannel_rails/config.rb', line 12 def dlr_mask @dlr_mask end |
#dlr_url ⇒ Object
Returns the value of attribute dlr_url.
11 12 13 |
# File 'lib/kannel_rails/config.rb', line 11 def dlr_url @dlr_url end |
#kannel_url ⇒ Object
Returns the value of attribute kannel_url.
5 6 7 |
# File 'lib/kannel_rails/config.rb', line 5 def kannel_url @kannel_url end |
#password ⇒ Object
Returns the value of attribute password.
9 10 11 |
# File 'lib/kannel_rails/config.rb', line 9 def password @password end |
#sendsms_port ⇒ Object
Returns the value of attribute sendsms_port.
6 7 8 |
# File 'lib/kannel_rails/config.rb', line 6 def sendsms_port @sendsms_port end |
#username ⇒ Object
Returns the value of attribute username.
8 9 10 |
# File 'lib/kannel_rails/config.rb', line 8 def username @username end |