Hacer: A very basic todo-list library

Author

Dave Copeland (davetron5000 at g mail dot com)

Copyright

Copyright © 2010 by Dave Copeland

License

Distributes under the Apache License, see LICENSE.txt in the source distro

Use

Install if you need to:

gem install hacer

Hacer provides a few basic features for managing a simple todolist:

  • Create - Create a new todo item

  • Complete - Compete a todo item

  • List - List todo items

  • Clean - Clear completed items from your todo list

Bootstrapping

The main entry into Hacer is Hacer::Todolist. Create one by pointing it to the location where you want your todo list to live:

todo_list = Hacer::Todolist.new("todos")

API

The Todolist essentially manages a list of Hacer::Todo items

todo = todo_list.create("Mow the lawn")
todo_list.list # => [Todo(1,Mow the lawn)]

todo = todo_list.create("Take out the trash")
todo_list.list # => [Todo(1,Mow the lawn), Todo(2,Take out the trash)]

todo.complete(1)
todo_list.list # => [Todo(2,Take out the trash)]

todo_list.list(:all) # => [Todo(1,Mow the lawn,completed), Todo(2,Take out the trash)]

todo_list.clean!
todo_list.list(:all) # => [Todo(2,Take out the trash)]

Notes

Development

gem install bundler
bundle install
rake test
rake rcov