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


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

Instance Attribute Details

#donation_dateDate


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