Class: VAldeias::Remessa::Trailler

Inherits:
FormatSection
  • Object
show all
Includes:
VAldeiasTraillerCommons
Defined in:
lib/formatos/cnab400/arquivo/VAldeias/trailler.rb

Instance Method Summary collapse

Methods included from VAldeiasTraillerCommons

#get_codigo_remessa, #get_sequencial, #is_valid?, #set_mensagem, #set_sequencial, #set_total_registros

Constructor Details

#initializeTrailler

Returns a new instance of Trailler.



8
9
10
11
12
13
14
15
16
# File 'lib/formatos/cnab400/arquivo/VAldeias/trailler.rb', line 8

def initialize
  @section = Section.new({
     0 => Position.new(1, 1, false, "9", true),                  # Código do Registro
     1 => Position.new(2, 1, false, "9"),                        # Código Remessa
     2 => Position.new(3, 6, true),                              # Qtde do Registro
     3 => Position.new(4, 385, false),                           # Mensagem do boleto
     4 => Position.new(5, 6, true),                              # Numero sequencial do registro
   })
end

Instance Method Details

#set_values(params) ⇒ Object



18
19
20
21
# File 'lib/formatos/cnab400/arquivo/VAldeias/trailler.rb', line 18

def set_values params
  set_mensagem            params[:mensagem]
  set_total_registros     params[:total_registros]
end