class RailsCommits::CommitHistory
This class is used to get the commit history for Rails on GitHub.
Public Class Methods
new(token, count = 10, author = nil)
click to toggle source
Initializer
Parameters:¶ ↑
- token
-
GitHub OAUTH Token
- count
-
Number of results to return (default: 10)
- author
-
Retrieve commits by only certain author (default: all)
# File lib/railscommits/commit_history.rb, line 14 def initialize(token, count = 10, author = nil) @token = token @count = count @author = author end
Public Instance Methods
history()
click to toggle source
Gets commit history for Rails on GitHub
# File lib/railscommits/commit_history.rb, line 21 def history RailsCommits::Request.new('repos/rails/rails/commits', @token, @count, @author).run end