Class: CNAB240::BancoABC::Entities::RegisterU
- Defined in:
- lib/cnab240/bancoabc/entities/register_u.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
- #acrescimos ⇒ Object
- #data ⇒ Object
- #data_credito ⇒ Object
- #data_ocorrencia ⇒ Object
-
#initialize(line) ⇒ RegisterU
constructor
A new instance of RegisterU.
- #register? ⇒ Boolean
- #segmento ⇒ Object
- #valor_abatimento ⇒ Object
- #valor_desconto ⇒ Object
- #valor_iof ⇒ Object
- #valor_liquido ⇒ Object
- #valor_outras_despesas ⇒ Object
- #valor_outros_creditos ⇒ Object
- #valor_pago ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(line) ⇒ RegisterU
Returns a new instance of RegisterU.
9 10 11 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 9 def initialize(line) @line = line end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
7 8 9 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 7 def line @line end |
Instance Method Details
#acrescimos ⇒ Object
37 38 39 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 37 def acrescimos line[17..31] end |
#data ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 17 def data { segmento: segmento.strip, acrescimos: acrescimos.strip, valor_desconto: valor_desconto.strip, valor_abatimento: valor_abatimento.strip, valor_iof: valor_iof.strip, valor_pago: valor_pago.strip, valor_liquido: valor_liquido.strip, valor_outras_despesas: valor_outras_despesas.strip, valor_outros_creditos: valor_outros_creditos.strip, data_ocorrencia: data_ocorrencia.strip, data_credito: data_credito.strip } end |
#data_credito ⇒ Object
73 74 75 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 73 def data_credito line[145..152] end |
#data_ocorrencia ⇒ Object
69 70 71 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 69 def data_ocorrencia line[137..144] end |
#register? ⇒ Boolean
13 14 15 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 13 def register? true end |
#segmento ⇒ Object
33 34 35 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 33 def segmento line[13] end |
#valor_abatimento ⇒ Object
45 46 47 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 45 def valor_abatimento line[47..61] end |
#valor_desconto ⇒ Object
41 42 43 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 41 def valor_desconto line[32..46] end |
#valor_iof ⇒ Object
49 50 51 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 49 def valor_iof line[62..76] end |
#valor_liquido ⇒ Object
57 58 59 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 57 def valor_liquido line[92..106] end |
#valor_outras_despesas ⇒ Object
61 62 63 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 61 def valor_outras_despesas line[107..121] end |
#valor_outros_creditos ⇒ Object
65 66 67 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 65 def valor_outros_creditos line[122..136] end |
#valor_pago ⇒ Object
53 54 55 |
# File 'lib/cnab240/bancoabc/entities/register_u.rb', line 53 def valor_pago line[77..91] end |