Class: Skuby::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/skuby/configuration.rb

Constant Summary collapse

SEND_METHODS =
%w(
  send_sms_basic
  send_sms_classic
  send_sms_classic_report
  test_send_sms_basic
  test_send_sms_classic
  test_send_sms_classic_report
).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



15
16
17
# File 'lib/skuby/configuration.rb', line 15

def initialize
  @method = 'send_sms_classic'
end

Instance Attribute Details

#charsetObject

Returns the value of attribute charset.



12
13
14
# File 'lib/skuby/configuration.rb', line 12

def charset
  @charset
end

#methodObject

Returns the value of attribute method.



12
13
14
# File 'lib/skuby/configuration.rb', line 12

def method
  @method
end

#passwordObject

Returns the value of attribute password.



12
13
14
# File 'lib/skuby/configuration.rb', line 12

def password
  @password
end

#sender_numberObject

Returns the value of attribute sender_number.



12
13
14
# File 'lib/skuby/configuration.rb', line 12

def sender_number
  @sender_number
end

#sender_stringObject

Returns the value of attribute sender_string.



12
13
14
# File 'lib/skuby/configuration.rb', line 12

def sender_string
  @sender_string
end

#usernameObject

Returns the value of attribute username.



12
13
14
# File 'lib/skuby/configuration.rb', line 12

def username
  @username
end

Instance Method Details

#to_hashObject



19
20
21
22
23
# File 'lib/skuby/configuration.rb', line 19

def to_hash
  instance_variables.each_with_object({}) do |var, result|
    result[var.to_s.delete("@")] = instance_variable_get(var)
  end
end