Class: Dolla::PaymentSlip::DueDate

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/dolla/payment_slip/due_date.rb

Constant Summary collapse

PAYSLIP_EPOCH_YEAR =
2014
PAYSLIP_YEAR_MUTATOR =
372
PAYSLIP_MONTH_MUTATOR =
31

Instance Method Summary collapse

Constructor Details

#initialize(due_date) ⇒ DueDate

Returns a new instance of DueDate.



13
14
15
# File 'lib/dolla/payment_slip/due_date.rb', line 13

def initialize due_date
  @due_date = due_date
end

Instance Method Details

#hashObject

TODO: hack temporal



18
19
20
21
# File 'lib/dolla/payment_slip/due_date.rb', line 18

def hash
  h = mutate_year(year) + mutate_month(month) + mutate_day(day)
  h.to_s.rjust(4, "0")
end