Class: Billplz::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Configuration

Returns a new instance of Configuration.



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

def initialize(options={})
  @http_timeout = 30
  @mode         = 'live'
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



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

def api_key
  @api_key
end

#http_timeoutObject

Returns the value of attribute http_timeout.



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

def http_timeout
  @http_timeout
end

#modeObject

Returns the value of attribute mode.



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

def mode
  @mode
end

Instance Method Details

#optionsObject



10
11
12
13
14
# File 'lib/billplz/configuration.rb', line 10

def options
  hash = Hash.new
  %w[api_key http_timeout mode].map{|key| hash[key.to_sym] = send(key) }
  hash
end