Class: ACH::Records::Record
- Inherits:
-
Object
- Object
- ACH::Records::Record
- Extended by:
- FieldIdentifiers
- Defined in:
- lib/ach/records/record.rb
Direct Known Subclasses
Addendum, BatchControl, BatchHeader, EntryDetail, FileControl, FileHeader, Nines
Constant Summary
Constants included from FieldIdentifiers
FieldIdentifiers::ENCODING_OPTIONS
Instance Attribute Summary collapse
-
#case_sensitive ⇒ Object
Returns the value of attribute case_sensitive.
Class Method Summary collapse
Instance Method Summary collapse
-
#records_count ⇒ Integer
Can override to include addenda count.
- #to_ach(eol: nil) ⇒ Object
Methods included from FieldIdentifiers
const_field, field, left_justify, spaceless_routing_field
Instance Attribute Details
#case_sensitive ⇒ Object
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
.fields ⇒ Object
7 8 9 |
# File 'lib/ach/records/record.rb', line 7 def fields @fields end |
Instance Method Details
#records_count ⇒ Integer
Returns 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 |