class VChainClient::BlockchainAdapterFactory
Public Class Methods
getAdapter(type, config, app_config)
click to toggle source
# File lib/vchain_client/blockchain_adapter_factory.rb, line 5 def self.getAdapter(type, config, app_config) if type == "bitcoind" return VChainClient::BitcoindBlockchainAdapter.new(config["server"], config["port"], config["rpc_username"], config["rpc_password"], config, app_config) elsif type == "blockcypher" return VChainClient::BlockcypherBlockchainAdapter.new(config["api_token"], config, app_config) end raise "No such adapter '#{type}'" end