Permalink
Browse files

Add .all_issues method to get issues of all states.

This closes #16.
  • Loading branch information...
1 parent 4b67c69 commit 8e613e3be0fdc0da1ab92a2eb4c746349eb5c366 @runpaint committed Apr 22, 2009
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/octopi/repository.rb
View
8 lib/octopi/repository.rb
@@ -58,9 +58,13 @@ def commits(branch = "master")
def issues(state = "open")
Issue.find_all(self, :state => state)
end
-
+
+ def all_issues
+ Issue::STATES.map{|state| self.issues(state)}.flatten
+ end
+
def issue(number)
Issue.find(self, number)
end
end
-end
+end

0 comments on commit 8e613e3

Please sign in to comment.