Class: Fonepaisa::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
# File 'lib/fonepaisa/configuration.rb', line 5

def initialize
  @api_key = nil
  @salt = nil
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



3
4
5
# File 'lib/fonepaisa/configuration.rb', line 3

def api_key
  @api_key
end

#saltObject

Returns the value of attribute salt.



3
4
5
# File 'lib/fonepaisa/configuration.rb', line 3

def salt
  @salt
end

Instance Method Details

#api_key!Object



10
11
12
# File 'lib/fonepaisa/configuration.rb', line 10

def api_key!
  api_key || raise(FonepaisaError, 'No api key specified.')
end

#salt!Object



14
15
16
# File 'lib/fonepaisa/configuration.rb', line 14

def salt!
  salt || raise(FonepaisaError, 'No salt specified.')
end