Class: Abank::CLI
- Inherits:
-
Thor
- Object
- Thor
- Abank::CLI
- Defined in:
- lib/abank.rb
Overview
CLI para carregar folhas calculo comuns no bigquery
Instance Method Summary collapse
-
#acc ⇒ Object
apaga classificador.
-
#act ⇒ Object
apaga contrato arrendamento.
-
#amv ⇒ Object
apaga movimentos.
-
#ccc ⇒ Object
cria classificador.
-
#cct ⇒ Object
cria contrato arrendamento.
-
#rct ⇒ Object
atualiza rendas de contrato arrendamento.
-
#rre ⇒ Object
atualiza rendas dos contratos ativos.
-
#scc ⇒ Object
mostra classificador.
-
#sct ⇒ Object
mostra contrato arrendamento.
-
#show ⇒ Object
mostra folha calculo.
-
#smc ⇒ Object
mostra dados classificacao.
-
#tag ⇒ Object
classifica movimentos.
-
#work ⇒ Object
carrega/apaga dados folha calculo.
Instance Method Details
#acc ⇒ Object
apaga classificador
85 86 87 |
# File 'lib/abank.rb', line 85 def acc Big.new(.transform_keys(&:to_sym)).cc_apaga.mv_classifica.ct_dados.re_insert end |
#act ⇒ Object
apaga contrato arrendamento
41 42 43 |
# File 'lib/abank.rb', line 41 def act Big.new(.transform_keys(&:to_sym)).ct_apaga end |
#amv ⇒ Object
apaga movimentos
25 26 27 |
# File 'lib/abank.rb', line 25 def amv Big.new(.transform_keys(&:to_sym)).mv_delete.ct_dados.re_insert end |
#ccc ⇒ Object
cria classificador
75 76 77 |
# File 'lib/abank.rb', line 75 def ccc Big.new(.transform_keys(&:to_sym)).cc_cria.mv_classifica.ct_dados.re_insert end |
#cct ⇒ Object
cria contrato arrendamento
50 51 52 |
# File 'lib/abank.rb', line 50 def cct Big.new(.transform_keys(&:to_sym)).ct_cria end |
#rct ⇒ Object
atualiza rendas de contrato arrendamento
57 58 59 60 61 |
# File 'lib/abank.rb', line 57 def rct opc = [:c] Big.new(c: opc, t: false).ct_apaga Big.new(c: opc, t: true).ct_cria end |
#rre ⇒ Object
atualiza rendas dos contratos ativos
65 66 67 |
# File 'lib/abank.rb', line 65 def rre Big.new.re_atualiza end |
#scc ⇒ Object
mostra classificador
94 95 96 |
# File 'lib/abank.rb', line 94 def scc Big.new(.transform_keys(&:to_sym)).cc_show end |
#sct ⇒ Object
mostra contrato arrendamento
33 34 35 |
# File 'lib/abank.rb', line 33 def sct Big.new(.transform_keys(&:to_sym)).ct_mostra end |
#show ⇒ Object
mostra folha calculo
122 123 124 125 126 |
# File 'lib/abank.rb', line 122 def show Dir.glob("#{DR}/*.xlsx").each do |file| Folha.new(.transform_keys(&:to_sym).merge(f: file)).processa_xls end end |
#smc ⇒ Object
mostra dados classificacao
102 103 104 |
# File 'lib/abank.rb', line 102 def smc Big.new(.transform_keys(&:to_sym).merge(p1: [], p2: [])).mc_show end |
#tag ⇒ Object
classifica movimentos
17 18 19 |
# File 'lib/abank.rb', line 17 def tag Big.new(.transform_keys(&:to_sym)).mv_classifica.ct_dados.re_insert end |
#work ⇒ Object
carrega/apaga dados folha calculo
113 114 115 116 117 |
# File 'lib/abank.rb', line 113 def work Dir.glob("#{DR}/*.xlsx").each do |file| Folha.new(.transform_keys(&:to_sym).merge(f: file, i: true)).processa_xls end end |