Class: Smsc::Config

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

Overview

Smsc configuration container.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Config

Create configuration object

Examples:

Smsc::Config.new(
 login: 'a',
 password: 2
)

Parameters:

  • params (Hash) (defaults to: {})
  • login (Hash)

    a customizable set of options

  • password (Hash)

    a customizable set of options

  • host (Hash)

    a customizable set of options

  • ssl (Hash)

    a customizable set of options

  • encoding (Hash)

    a customizable set of options

  • logger (Hash)

    a customizable set of options



36
37
38
39
40
# File 'lib/smsc/config.rb', line 36

def initialize(params = {})
  params.each do |key, val|
    send("#{key}=", val)
  end
end

Instance Attribute Details

#encodingString

character encoding

Returns:

  • (String)

    the current value of encoding



11
12
13
# File 'lib/smsc/config.rb', line 11

def encoding
  @encoding
end

#hostString

api host

Returns:

  • (String)

    the current value of host



11
12
13
# File 'lib/smsc/config.rb', line 11

def host
  @host
end

#loggerLogger

logger

Returns:

  • (Logger)

    the current value of logger



11
12
13
# File 'lib/smsc/config.rb', line 11

def logger
  @logger
end

#loginString

user login

Returns:

  • (String)

    the current value of login



11
12
13
# File 'lib/smsc/config.rb', line 11

def 
  @login
end

#passwordString

user password

Returns:

  • (String)

    the current value of password



11
12
13
# File 'lib/smsc/config.rb', line 11

def password
  @password
end

#sslBoolean

use https for requests

Returns:

  • (Boolean)

    the current value of ssl



11
12
13
# File 'lib/smsc/config.rb', line 11

def ssl
  @ssl
end