module CryptocoinPayable::Adapters
Public Class Methods
bitcoin_adapter()
click to toggle source
# File lib/cryptocoin_payable/adapters.rb, line 20 def self.bitcoin_adapter @bitcoin_adapter ||= Bitcoin.new end
bitcoin_cash_adapter()
click to toggle source
# File lib/cryptocoin_payable/adapters.rb, line 16 def self.bitcoin_cash_adapter @bitcoin_cash_adapter ||= BitcoinCash.new end
ethereum_adapter()
click to toggle source
# File lib/cryptocoin_payable/adapters.rb, line 24 def self.ethereum_adapter @ethereum_adapter ||= Ethereum.new end
for(coin_type)
click to toggle source
# File lib/cryptocoin_payable/adapters.rb, line 3 def self.for(coin_type) case coin_type.to_sym when :bch bitcoin_cash_adapter when :btc bitcoin_adapter when :eth ethereum_adapter else raise "Invalid coin type #{coin_type}" end end