Class: Kinabo::Bradesco::Remessa::Header

Inherits:
Hashie::Dash
  • Object
show all
Includes:
Utils
Defined in:
lib/kinabo/bradesco/remessa/header.rb

Instance Method Summary collapse

Methods included from Utils

#fill_sequencial, #justify_number, #justify_string, #justify_value, #parse_date, #parse_decimal, #parse_number, #parse_string

Instance Method Details

#buildObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/kinabo/bradesco/remessa/header.rb', line 12

def build
  parts = '01REMESSA01'

  parts << justify_string('COBRANCA', 15)
  parts << justify_number(codigo_empresa, 20)
  parts << justify_string(nome_empresa, 30)
  parts << '237'
  parts << justify_string('BRADESCO', 15)
  parts << justify_number(data_gravacao, 6)
  parts << justify_string('', 8)
  parts << 'MX'
  parts << justify_number(sequencial, 7)
  parts << justify_string('', 277)
end