Class: Billplz::Configuration
- Inherits:
-
Object
- Object
- Billplz::Configuration
- Defined in:
- lib/billplz/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#http_timeout ⇒ Object
Returns the value of attribute http_timeout.
-
#mode ⇒ Object
Returns the value of attribute mode.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
- #options ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 |
# File 'lib/billplz/configuration.rb', line 5 def initialize(={}) @http_timeout = 30 @mode = 'live' end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/billplz/configuration.rb', line 3 def api_key @api_key end |
#http_timeout ⇒ Object
Returns the value of attribute http_timeout.
3 4 5 |
# File 'lib/billplz/configuration.rb', line 3 def http_timeout @http_timeout end |
#mode ⇒ Object
Returns the value of attribute mode.
3 4 5 |
# File 'lib/billplz/configuration.rb', line 3 def mode @mode end |
Instance Method Details
#options ⇒ Object
10 11 12 13 14 |
# File 'lib/billplz/configuration.rb', line 10 def hash = Hash.new %w[api_key http_timeout mode].map{|key| hash[key.to_sym] = send(key) } hash end |