Class: BrBoleto::Retorno::Base

Inherits:
ActiveModelBase show all
Defined in:
lib/br_boleto/retorno/base.rb

Direct Known Subclasses

Cnab240::Base, Cnab400::Base

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ActiveModelBase

#assign_attributes, #default_values

Constructor Details

#initialize(file) ⇒ Base

Returns a new instance of Base.



10
11
12
13
14
# File 'lib/br_boleto/retorno/base.rb', line 10

def initialize(file)
  self.pagamentos = []
  @file = file
  read_file! if @file.present?
end

Instance Attribute Details

#codigo_bancoObject

Returns the value of attribute codigo_banco.



8
9
10
# File 'lib/br_boleto/retorno/base.rb', line 8

def codigo_banco
  @codigo_banco
end

#fileObject (readonly)

Returns the value of attribute file.



6
7
8
# File 'lib/br_boleto/retorno/base.rb', line 6

def file
  @file
end

#pagamentosObject

O atributo pagamentos sempre irá retornar um Array



19
20
21
# File 'lib/br_boleto/retorno/base.rb', line 19

def pagamentos
  @pagamentos
end