Class: CNAB240::BancoABC::Entities::Trailler

Inherits:
Base
  • Object
show all
Defined in:
lib/cnab240/bancoabc/entities/trailler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#header?, #register?

Constructor Details

#initialize(line) ⇒ Trailler

Returns a new instance of Trailler.



9
10
11
# File 'lib/cnab240/bancoabc/entities/trailler.rb', line 9

def initialize(line)
  @line = line
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



7
8
9
# File 'lib/cnab240/bancoabc/entities/trailler.rb', line 7

def line
  @line
end

Instance Method Details

#codigo_bancoObject

Identificacao do registro trailler



20
21
22
# File 'lib/cnab240/bancoabc/entities/trailler.rb', line 20

def codigo_banco
  line[0..2]
end

#dataObject



17
# File 'lib/cnab240/bancoabc/entities/trailler.rb', line 17

def data; end

#lote_do_servicoObject



24
25
26
# File 'lib/cnab240/bancoabc/entities/trailler.rb', line 24

def lote_do_servico
  line[3..6]
end

#quantidade_contas_para_conciliacaoObject



44
45
46
# File 'lib/cnab240/bancoabc/entities/trailler.rb', line 44

def quantidade_contas_para_conciliacao
  line[29..34]
end

#quantidade_lotesObject



36
37
38
# File 'lib/cnab240/bancoabc/entities/trailler.rb', line 36

def quantidade_lotes
  line[17..22]
end

#quantidade_registrosObject



40
41
42
# File 'lib/cnab240/bancoabc/entities/trailler.rb', line 40

def quantidade_registros
  line[23..28]
end

#tipo_registroObject



28
29
30
# File 'lib/cnab240/bancoabc/entities/trailler.rb', line 28

def tipo_registro
  line[7]
end

#trailler?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/cnab240/bancoabc/entities/trailler.rb', line 13

def trailler?
  true
end

#uso_exclusivo_febraban_1Object



32
33
34
# File 'lib/cnab240/bancoabc/entities/trailler.rb', line 32

def uso_exclusivo_febraban_1
  line[8..16]
end

#uso_exclusivo_febraban_2Object



48
49
50
# File 'lib/cnab240/bancoabc/entities/trailler.rb', line 48

def uso_exclusivo_febraban_2
  line[35..239]
end