Class: KannelRails::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/kannel_rails/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_secretObject

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_maskObject

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_urlObject

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_urlObject

Returns the value of attribute kannel_url.



5
6
7
# File 'lib/kannel_rails/config.rb', line 5

def kannel_url
  @kannel_url
end

#passwordObject

Returns the value of attribute password.



9
10
11
# File 'lib/kannel_rails/config.rb', line 9

def password
  @password
end

#sendsms_portObject

Returns the value of attribute sendsms_port.



6
7
8
# File 'lib/kannel_rails/config.rb', line 6

def sendsms_port
  @sendsms_port
end

#usernameObject

Returns the value of attribute username.



8
9
10
# File 'lib/kannel_rails/config.rb', line 8

def username
  @username
end