Class: Aba::Entry
- Inherits:
-
Object
- Object
- Aba::Entry
- Defined in:
- lib/aba/entry.rb
Direct Known Subclasses
Instance Method Summary collapse
- #credit? ⇒ Boolean
- #debit? ⇒ Boolean
-
#initialize(attrs = {}) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(attrs = {}) ⇒ Entry
Returns a new instance of Entry.
3 4 5 6 7 |
# File 'lib/aba/entry.rb', line 3 def initialize(attrs = {}) attrs.each do |key, value| send("#{key}=", value) end end |
Instance Method Details
#credit? ⇒ Boolean
9 10 11 |
# File 'lib/aba/entry.rb', line 9 def credit? Validations::CREDIT_TRANSACTION_CODES.include?(transaction_code.to_i) end |
#debit? ⇒ Boolean
13 14 15 |
# File 'lib/aba/entry.rb', line 13 def debit? Validations::DEBIT_TRANSACTION_CODES.include?(transaction_code.to_i) end |