Class: GitHub::Commit
- Inherits:
-
Object
- Object
- GitHub::Commit
- Includes:
- HappyMapper
- Defined in:
- lib/le_git/commit.rb
Class Method Summary collapse
-
.find(username, repository, hash_or_all) ⇒ Object
Find commit(s) for a particular username/repository.
Class Method Details
.find(username, repository, hash_or_all) ⇒ Object
Find commit(s) for a particular username/repository
username:
GitHub username, required, +String+
repository:
Name of repository, required, +String+
hash_or_:all
a commit's hash to get a single commit
OR
:all to get the first 30 commits
Example:
GitHub::Commit.find("caged", "gitnub", :all)
GitHub::Commit.find "defunkt", "github-gem", "c26d4ce9807ecf57d3f9eefe19ae64e75bcaaa8b"
32 33 34 35 36 37 38 39 |
# File 'lib/le_git/commit.rb', line 32 def self.find(username, repository, hash_or_all) case hash_or_all when :all self.find_all username, repository else self.find_by_hash username, repository, hash_or_all end end |