Class: Cns::Bitcoinde
- Inherits:
-
Object
- Object
- Cns::Bitcoinde
- Extended by:
- Memoist
- Defined in:
- lib/cns/bitcoinde.rb
Overview
classe para processar transacoes trades/ledger do bitcoinde
Instance Attribute Summary collapse
- #bqd ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess readonly
- #ops ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess readonly
Instance Method Summary collapse
-
#initialize(dad, pop) ⇒ Bitcoinde
constructor
A new instance of Bitcoinde.
-
#mresumo ⇒ String
Texto saldos & transacoes & ajuste dias.
Constructor Details
#initialize(dad, pop) ⇒ Bitcoinde
Returns a new instance of Bitcoinde.
20 21 22 23 |
# File 'lib/cns/bitcoinde.rb', line 20 def initialize(dad, pop) @bqd = dad @ops = pop.transform_keys(&:to_sym) end |
Instance Attribute Details
#bqd ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess (readonly)
13 14 15 |
# File 'lib/cns/bitcoinde.rb', line 13 def bqd @bqd end |
#ops ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess (readonly)
13 14 15 |
# File 'lib/cns/bitcoinde.rb', line 13 def ops @ops end |
Instance Method Details
#mresumo ⇒ String
Returns texto saldos & transacoes & ajuste dias.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/cns/bitcoinde.rb', line 26 def mresumo puts("\nBITCOINDE\ntipo bitcoinde bigquery") exd[:sl].sort.each { |k, v| puts(fos(k, v)) } mtotais mtrades mledger return if novxt.empty? puts("\nstring ajuste dias dos trades\n-h=#{novxt.sort_by { |i| -i[:srx] }.map { |o| "#{o[:trade_id]}:0" }.join(' ')}") end |