Sha256: 443a0f6618848dbce95f4c35cd77410f83fd66b343385d9cccf8c51218175b64
Contents?: true
Size: 1.49 KB
Versions: 1
Compression:
Stored size: 1.49 KB
Contents
module Peatio module Hthcoin module Hooks BLOCKCHAIN_VERSION_REQUIREMENT = "~> 1.0.0" WALLET_VERSION_REQUIREMENT = "~> 1.0.0" class << self def check_compatibility unless Gem::Requirement.new(BLOCKCHAIN_VERSION_REQUIREMENT) .satisfied_by?(Gem::Version.new(Peatio::Blockchain::VERSION)) [ "Hthcoin blockchain version requiremnt was not suttisfied by Peatio::Blockchain.", "Hthcoin blockchain requires #{BLOCKCHAIN_VERSION_REQUIREMENT}.", "Peatio::Blockchain version is #{Peatio::Blockchain::VERSION}" ].join('\n').tap { |s| Kernel.abort s } end unless Gem::Requirement.new(WALLET_VERSION_REQUIREMENT) .satisfied_by?(Gem::Version.new(Peatio::Wallet::VERSION)) [ "Hthcoin wallet version requiremnt was not suttisfied by Peatio::Wallet.", "Hthcoin wallet requires #{WALLET_VERSION_REQUIREMENT}.", "Peatio::Wallet version is #{Peatio::Wallet::VERSION}" ].join('\n').tap { |s| Kernel.abort s } end end def register Peatio::Blockchain.registry[:hthcoin] = Hthcoin::Blockchain.new Peatio::Wallet.registry[:hthcoind] = Hthcoin::Wallet.new end end if defined?(Rails::Railtie) require "peatio/hthcoin/railtie" else check_compatibility register end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ultex-hthcoin-0.2.1 | lib/peatio/hthcoin/hooks.rb |