Getting things done algorithm

# Make sure all inboxes are empty.
def process (inboxes)
  inboxes.each { |inbox|
    inbox.each { |item|
      if item.requires_action? then
        if item.takes_epsilon_time? then
          item.do()
        elsif item.can_be_delegated? then
          item.delegate
          waiting_for.append(item)
        else
          deferred.append(item)
        end
      elsif item.is_needed_later? then
        filing_system.append(item)
      elsif item.maybe_wanted_later?
        someday_maybe.append(item)
      else
        trash.append(time)
      end
    }
  }
end

Taked from http://paste.ubuntu.com/263929/ and translated to Ruby language.