Class: CoinSync::Importers::Base
- Inherits:
-
Object
- Object
- CoinSync::Importers::Base
show all
- Defined in:
- lib/coinsync/importers/base.rb
Direct Known Subclasses
ArkVoting, BinanceAPI, BitBay20, BitBayAPI, Bitcurex, BitstampCSV, BittrexAPI, BittrexCSV, Changelly, Circle, Default, EtherDelta, KrakenAPI, KrakenCSV, KucoinAPI, LiskVoting
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(config, params = {}) ⇒ Base
Returns a new instance of Base.
25
26
27
28
|
# File 'lib/coinsync/importers/base.rb', line 25
def initialize(config, params = {})
@config = config
@params = params
end
|
Class Method Details
.register_commands(*commands) ⇒ Object
16
17
18
19
|
# File 'lib/coinsync/importers/base.rb', line 16
def self.register_commands(*commands)
@commands ||= []
@commands += commands.map(&:to_sym)
end
|
.register_importer(key) ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/coinsync/importers/base.rb', line 8
def self.register_importer(key)
if Importers.registered[key]
raise "Importer has already been registered at '#{key}'"
else
Importers.registered[key] = self
end
end
|
.registered_commands ⇒ Object
21
22
23
|
# File 'lib/coinsync/importers/base.rb', line 21
def self.registered_commands
@commands || []
end
|
Instance Method Details
#can_build? ⇒ Boolean
30
31
32
|
# File 'lib/coinsync/importers/base.rb', line 30
def can_build?
true
end
|