formatos-febraban 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f3b8433a2ac8020f40c378303a6a3aef0a7fd1f
4
- data.tar.gz: a22fbbae8821eeff5af8273646170f78ca68918c
3
+ metadata.gz: cf71528dff5ac9dc2bf1d5d443a0c95ef63b4770
4
+ data.tar.gz: 6bfbc4c6c9c4aee53eafd47a1ee6636b8d681a25
5
5
  SHA512:
6
- metadata.gz: 318127f609eb6b2147ba182bb034c2c849abc7fbc2b8d061f3ae823159e5297407656bd0fbd5b2a23ced5d0a148019afe9579c4655242603ea7901c79c12d5e5
7
- data.tar.gz: a185a24cdf15eb28244247a50398207ca1bd4b0c3b0e0882db1efbccdca4f87b10f7a59e3f416203fed96cd50aff76e2a40532076e0bc2b68f1b0e138ad71b28
6
+ metadata.gz: 1b4119d141af82687209dd4ae459e53c0ab82a632bc85747a966e2a0922ad4b7b0ca95ca53a36df9112dd363223c709067d0a30ce99ca769932400c7e83b3bb5
7
+ data.tar.gz: eea01d723bcecf59759ce2afcfcdbc17b9f9014775273b4e7c7ab96e356c2902dca8ff2715cffb6c288b6eca12f5b69020e53313c8000b1b182a1beaafb18390
@@ -433,12 +433,15 @@ class Febraban150
433
433
  #--------------------------------------------------------------------------------------
434
434
  # Utilitários
435
435
  public
436
- def save path
436
+ def save (path, generate_name = true)
437
437
  raise "Caminho para salvamento inválido!" unless path.length > 0
438
438
  raise "Layout atual inválido!" unless self.is_valid?
439
439
 
440
- path += "/" if not path.end_with?("/")
441
- path += "#{header.get_data_geracao}_#{codigo_remessa}_#{header.get_codigo_banco}_#{self.versao_layout}.bat"
440
+ if generate_name
441
+ path += "/" if not path.end_with?("/")
442
+ path += "#{header.get_data_geracao}_#{codigo_remessa}_#{header.get_codigo_banco}_#{self.versao_layout}.bat"
443
+ end
444
+
442
445
  File.write(path, self.to_s)
443
446
  end
444
447
 
@@ -1,5 +1,5 @@
1
1
  module Formatos
2
2
  module Febraban
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formatos-febraban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - josé Ricardo Almeida