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

- old
+ new

@@ -9,16 +9,21 @@ # https://www.btcbox.co.jp/help/api.html class Btcbox < Market @@nonce = 0 - def initialize() + def initialize(options = {}) super() @name = "BtcBox" @api_key = ENV["BTCBOX_KEY"] @api_secret = ENV["BTCBOX_SECRET"] @url_public = "https://www.btcbox.co.jp/api/v1" @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 #############################################################