lib/kaesen/zaif.rb in kaesen-0.1.0 vs lib/kaesen/zaif.rb in kaesen-0.1.1
- old
+ new
@@ -10,16 +10,21 @@
# https://corp.zaif.jp/api-docs/
class Zaif < Market
@@nonce = 0
- def initialize()
+ def initialize(options = {})
super()
@name = "Zaif"
@api_key = ENV["ZAIF_KEY"]
@api_secret = ENV["ZAIF_SECRET"]
@url_public = "https://api.zaif.jp/api/1"
@url_private = "https://api.zaif.jp/tapi"
+
+ options.each do |key, value|
+ instance_variable_set("@#{key}", value)
+ end
+ yield(self) if block_given?
end
#############################################################
# API for public information
#############################################################