class Ghit::Stats::Contributors

Public Class Methods

get!() click to toggle source
# File lib/ghit/stats/contributors.rb, line 6
def get!
  new.get
end
new() click to toggle source
# File lib/ghit/stats/contributors.rb, line 11
def initialize
  @globals = Ghit::Globals.new
  @stats   = Github::Client::Repos::Statistics.new
end

Public Instance Methods

get() click to toggle source
# File lib/ghit/stats/contributors.rb, line 16
def get
  contributors = fetch_contributors
  
  print_output_heading
  contributors.each do |c|
    print_contributor_data c
  end
  print_fourty_dashes
end

Private Instance Methods

fetch_contributors() click to toggle source
# File lib/ghit/stats/contributors.rb, line 28
def fetch_contributors
  @stats.contributors(user: @globals.author, repo: @globals.repository).body
end
print_contributor_data(contrib) click to toggle source
print_fourty_dashes() click to toggle source
print_output_heading() click to toggle source