module Bitbank
Public Class Methods
config()
click to toggle source
# File lib/bitbank.rb, line 20 def self.config @config end
config=(filename_or_hash)
click to toggle source
# File lib/bitbank.rb, line 24 def self.config=(filename_or_hash) if filename_or_hash.is_a?(String) options = YAML.load_file(filename_or_hash) else options = filename_or_hash end options.symbolize_keys! if options.has_key?(:username) && options.has_key?(:password) @config = @@defaults.merge(options) else raise ArgumentError, 'Please specify a username and password for bitcoind' end end
new(options={})
click to toggle source
# File lib/bitbank.rb, line 15 def self.new(options={}) self.config = options Client.new(config) end
version()
click to toggle source
# File lib/bitbank.rb, line 39 def self.version version_path = File.join(File.dirname(__FILE__), '..', 'VERSION') if File.file?(version_path) File.read(version_path).chomp else '0.0.0' end end