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

- old
+ new

@@ -4,21 +4,26 @@ require 'json' require 'bigdecimal' module Kaesen # Coincheck Wrapper Class - # https://coincheck.jp/documents/exchange/api?locale=ja + # https://coincheck.com/documents/exchange/api?locale=ja class Coincheck < Market @@nonce = 0 - def initialize() + def initialize(options = {}) super() @name = "Coincheck" @api_key = ENV["COINCHECK_KEY"] @api_secret = ENV["COINCHECK_SECRET"] - @url_public = "https://coincheck.jp" + @url_public = "https://coincheck.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 #############################################################