lib/kaesen/quoine.rb in kaesen-0.1.0 vs lib/kaesen/quoine.rb in kaesen-0.1.1

- old
+ new

@@ -11,16 +11,21 @@ # API users should not make more than 300 requests per 5 minute. Requests go beyond the limit will return with a 429 status class Quoine < Market @@nonce = 0 - def initialize() + def initialize(options = {}) super() @name = "Quoine" @api_key = ENV["QUOINE_KEY"] @api_secret = ENV["QUOINE_SECRET"] @url_public = "https://api.quoine.com" @url_private = @url_public + + options.each do |key, value| + instance_variable_set("@#{key}", value) + end + yield(self) if block_given? end ############################################################# # API for public information #############################################################