#+TITLE: kanban - Agile Workflow for Ruby
** Create a Backlog
#+BEGIN_SRC ruby
require 'redis'
require 'kanban'
backlog = Kanban::Backlog.new backend: Redis.new
#+END_SRC
** Add some tasks to your shiny new Backlog
#+BEGIN_SRC ruby
task = { 'foo' => 'bar' }
5.times { backlog.add task }
#+END_SRC
** (Elsewhere) Stake a claim on a task from the backlog
#+BEGIN_SRC ruby
task_id = backlog.claim # Will block until there is a task, if the backlog is empty or all tasks are being worked.
details = backlog.get task_id
#+END_SRC
** Mark a task as complete (or unworkable)
#+BEGIN_SRC ruby
backlog.complete task_id
# or backlog.unworkable task_id
backlog.done? task_id # => true
#+END_SRC