Class: ACH::Records::Record

Inherits:
Object
  • Object
show all
Extended by:
FieldIdentifiers
Defined in:
lib/ach/records/record.rb

Constant Summary

Constants included from FieldIdentifiers

FieldIdentifiers::ENCODING_OPTIONS

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from FieldIdentifiers

const_field, field, left_justify, spaceless_routing_field

Instance Attribute Details

#case_sensitiveObject

Returns the value of attribute case_sensitive.



14
15
16
# File 'lib/ach/records/record.rb', line 14

def case_sensitive
  @case_sensitive
end

Class Method Details

.fieldsObject



7
8
9
# File 'lib/ach/records/record.rb', line 7

def fields
  @fields
end

Instance Method Details

#records_countInteger

Returns Can override to include addenda count.

Returns:

  • (Integer)

    Can override to include addenda count.



22
23
24
# File 'lib/ach/records/record.rb', line 22

def records_count
  1
end

#to_ach(eol: nil) ⇒ Object



16
17
18
19
# File 'lib/ach/records/record.rb', line 16

def to_ach eol: nil
  to_ach = self.class.fields.collect { |f| send("#{f}_to_ach") }.join('')
  case_sensitive ? to_ach : to_ach.upcase
end