Class: ESA::Amount Abstract

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/esa/amount.rb

Overview

This class is abstract.

An amount must be a subclass as either a debit or a credit to be saved to the database.

The Amount class represents debit and credit amounts in the system.

Author:

  • Lenno Nagel, Michael Bulat

Direct Known Subclasses

ESA::Amounts::Credit, ESA::Amounts::Debit

Instance Method Summary collapse

Instance Method Details

#is_credit?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'app/models/esa/amount.rb', line 19

def is_credit?
  self.is_a? Amounts::Credit
end

#is_debit?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'app/models/esa/amount.rb', line 23

def is_debit?
  self.is_a? Amounts::Debit
end