Class: Cns::Greymass

Inherits:
Object
  • Object
show all
Extended by:
Memoist
Defined in:
lib/cns/greymass.rb

Overview

classe para processar transacoes do greymass

Constant Summary collapse

TT =
{sork: :itx, adjk: :itx}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dad, pop) ⇒ Greymass

Returns a new instance of Greymass.

Parameters:

  • dad (Hash)

    todos os dados bigquery

  • pop (Thor::CoreExt::HashWithIndifferentAccess)

    opcoes trabalho

Options Hash (pop):

  • :h (Hash) — default: {}

    configuracao dias ajuste reposicionamento temporal

  • :v (Boolean) — default: false

    mostra dados transacoes?

  • :t (Boolean) — default: false

    mostra transacoes todas ou somente novas?



22
23
24
25
# File 'lib/cns/greymass.rb', line 22

def initialize(dad, pop)
  @bqd = dad
  @ops = pop.transform_keys(&:to_sym)
end

Instance Attribute Details

#bqdArray<Hash>, Thor::CoreExt::HashWithIndifferentAccess (readonly)

Returns:

  • (Array<Hash>)

    todos os dados bigquery

  • (Thor::CoreExt::HashWithIndifferentAccess)

    opcoes trabalho



13
14
15
# File 'lib/cns/greymass.rb', line 13

def bqd
  @bqd
end

#opsArray<Hash>, Thor::CoreExt::HashWithIndifferentAccess (readonly)

Returns:

  • (Array<Hash>)

    todos os dados bigquery

  • (Thor::CoreExt::HashWithIndifferentAccess)

    opcoes trabalho



13
14
15
# File 'lib/cns/greymass.rb', line 13

def ops
  @ops
end

Instance Method Details

#mresumoObject

Display summary of wallets, transactions, and adjustment days configuration



28
29
30
31
32
33
34
35
# File 'lib/cns/greymass.rb', line 28

def mresumo
  return unless bqexd.any?

  puts("\naddress            greymass  ntx       bigquery  ntx")
  bqexd.each { |e| puts(foct(e)) }
  mtransacoes_novas
  mconfiguracao_ajuste_dias
end