Class: Osm::GiftAid::Donation

Inherits:
Model
  • Object
show all
Defined in:
lib/osm/giftaid.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#<, #<=, #>, #>=, #between?, #changed_attributes, configure, #reset_changed_attributes, #to_i

Constructor Details

#initializeObject

Initialize a new RegisterField

Parameters:

  • attributes (Hash)

    The hash of attributes (see attributes for descriptions, use Symbol of attribute name as the key)



# File 'lib/osm/giftaid.rb', line 149

Instance Attribute Details

#donation_dateDate

Returns When the payment was made.

Returns:

  • (Date)

    When the payment was made



140
# File 'lib/osm/giftaid.rb', line 140

attribute :donation_date, :type => Date

Instance Method Details

#<=>(another) ⇒ Object

Compare Payment based on donation_date then note



155
156
157
# File 'lib/osm/giftaid.rb', line 155

def <=>(another)
  return self.donation_date <=> another.try(:donation_date)
end