Commits on Jun 9, 2011
  1. Move towards a more OO approach where objects observe a clock. Separa…

    …te payment schedule logic into a separate class so the loan doesn't need to know about it.
    The construction & knitting together of all the components of a loan is currently very verbose and un-encapsulated, but this will be addressed in a later commit.
    committed Jun 9, 2011
Commits on Jun 4, 2011
  1. Simplify things a bit by moving PaymentCalculator classes into Loan c…

    …lass and giving more responsibility to the Loan factory methods.
    committed Jun 4, 2011
  2. If Simulator#play is called with a block, call it after each month so…

    … it can be used for e.g. recording state.
    committed Jun 4, 2011
  3. Add #percent method to classes providing #to_f to simplify constructi…

    …on of Percentage instances and improve readability.
    committed Jun 4, 2011
Commits on May 31, 2011
  1. Updated README.

    committed May 31, 2011
  2. Renamed RepaymentStrategy to PaymentCalculator in part to reflect its…

    … increased responsibility.
    committed May 31, 2011
  3. Reduce duplication.

    committed May 31, 2011
  4. By introducing a principal account into the loan, giving more respons…

    …ibility to the repayment strategy, and introducing a term class, we can make the code a bit clearer.
    committed May 31, 2011
Commits on May 27, 2011
  1. Handle interest rate changes on repayment loans. Note that monthly pa…

    …yment has to be recalculated at this point.
    Note that this solution is fairly quick and dirty. I have some ideas on how to improve it.
    Also note that we now have two failing tests due to rounding errors in the monthly principal payments leading to a smallamount owed at the end.
    committed May 27, 2011
Commits on May 26, 2011
  1. Added a basic README.

    committed May 26, 2011
  2. Introduce repayment strategy classes so we can deal with interest-onl…

    …y and repayment loans.
    committed May 26, 2011
  3. No need to expose Simulator#current_month_index any more. Also using …

    …the range provided in Simulator#play seems more sensible.
    committed May 26, 2011
  4. Initial commit.

    committed May 26, 2011