module Dagjeweg::Config
Configuration object for storing some parameters required for making transactions
Attributes
api_key[RW]
@return [String] Your Dagjeweg
API Key @note The is a required parameter.
Public Class Methods
init!()
click to toggle source
Set's the default value's to nil and false @return [Hash] configuration options
# File lib/dagjeweg/config.rb, line 13 def init! @defaults = { :@api_key => nil, } end
reset!()
click to toggle source
Resets the value's to there previous value (instance_variable) @return [Hash] configuration options
# File lib/dagjeweg/config.rb, line 21 def reset! @defaults.each { |key, value| instance_variable_set(key, value) } end
update!()
click to toggle source
Set's the new value's as instance variables @return [Hash] configuration options
# File lib/dagjeweg/config.rb, line 27 def update! @defaults.each do |key, value| instance_variable_set(key, value) unless instance_variable_defined?(key) end end