formatos-febraban 0.3.45 → 0.3.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/formatos/cielo/cielo.rb +1 -1
- data/lib/formatos/cielo/cielo_detalhe.rb +4 -0
- data/lib/formatos/cnab400/cnab_400.rb +150 -40
- data/lib/formatos/cnab400/cnab_400_0.rb +108 -127
- data/lib/formatos/cnab400/cnab_400_1.rb +443 -0
- data/lib/formatos/cnab400/cnab_400_2.rb +188 -0
- data/lib/formatos/cnab400/cnab_400_3.rb +194 -0
- data/lib/formatos/cnab400/cnab_400_7.rb +194 -0
- data/lib/formatos/cnab400/cnab_400_9.rb +55 -0
- data/lib/formatos/febraban/version.rb +1 -1
- data/lib/formatos/febraban150/febraban_150.rb +9 -5
- metadata +2 -2
@@ -32,16 +32,20 @@ class Febraban150
|
|
32
32
|
#-------------------------------------------------------------------
|
33
33
|
#-------------------------------------------------------------------
|
34
34
|
# Construtor
|
35
|
-
def initialize(file = '', versao =
|
35
|
+
def initialize(file = '', versao = '')
|
36
36
|
@sections = []
|
37
37
|
@versao = versao
|
38
38
|
|
39
|
-
self.valida_versao
|
40
|
-
self.
|
39
|
+
self.valida_versao(file)
|
40
|
+
self.valida_arquivo(file)
|
41
41
|
end
|
42
42
|
|
43
43
|
protected
|
44
|
-
def valida_versao
|
44
|
+
def valida_versao(file)
|
45
|
+
if file.size > 0
|
46
|
+
@versao = @versao.present? ? @versao : IO.readlines(file)[0][79..80]
|
47
|
+
end
|
48
|
+
|
45
49
|
unless Febraban150::VersaoDisponivel.include?(@versao)
|
46
50
|
raise "Versão #{@versao} não suportada.
|
47
51
|
Utilizar versões #{Febraban150::VersaoDisponivel.inspect}"
|
@@ -49,7 +53,7 @@ class Febraban150
|
|
49
53
|
end
|
50
54
|
|
51
55
|
def valida_arquivo(file = '')
|
52
|
-
if file.
|
56
|
+
if file.size > 0
|
53
57
|
self.process_file file
|
54
58
|
end
|
55
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formatos-febraban
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.47
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Ricardo Almeida
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|