Skip to content
Browse files

Refactored author_stats method

  • Loading branch information...
1 parent 4e1ca63 commit b1df659e0bd53d317eb09639151d783e10c5ac06 @adarsh adarsh committed Apr 30, 2012
Showing with 8 additions and 5 deletions.
  1. +8 −5 lib/table.rb
View
13 lib/table.rb
@@ -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
@@ -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.
Something went wrong with that request. Please try again.