Skip to content

Commit

Permalink
Refactored author_stats method
Browse files Browse the repository at this point in the history
  • Loading branch information
adarsh committed Apr 30, 2012
1 parent 4e1ca63 commit b1df659
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/table.rb
Expand Up @@ -7,9 +7,7 @@ def output_results
display_header

begin
Repo.new(@input).get_forking_authors.each do |author|
puts column_spacing % author.stats
end
display_author_stats
rescue
puts 'Repo not found.'
end
Expand All @@ -21,10 +19,15 @@ def column_spacing
'%-20s %-10s %-10s %-10s %-10s %-10s %-10s'
end

def display_author_stats
Repo.new(@input).get_forking_authors.each do |author|
puts column_spacing % author.stats
end
end

def display_header
puts column_spacing % Author.stat_types
print '='*80
puts
puts '='*80
end
end

0 comments on commit b1df659

Please sign in to comment.