/app/models/Task.io

http://github.com/pgregory/blackpool · Unknown · 26 lines · 20 code · 6 blank · 0 comment · 0 complexity · 9874856746149073ca023d36062f1787 MD5 · raw file

  1. Task := Object clone do(
  2. init := method(
  3. id ::= nil
  4. completed ::= false
  5. deadline ::= Date copy(Date today)
  6. taskDescription ::= Sequence clone
  7. taskName ::= Sequence clone
  8. )
  9. isPending := method(
  10. completed not and deadline isPast not
  11. )
  12. isMissed := method(
  13. completed not and deadline isPast
  14. )
  15. isValid := method(
  16. deadline isNil not and
  17. taskDescription isEmpty not and
  18. taskName isEmpty not
  19. )
  20. )