Class: GitStats::StatsView::Charts::RepoCharts
- Inherits:
-
Object
- Object
- GitStats::StatsView::Charts::RepoCharts
- Defined in:
- lib/git_stats/stats_view/charts/repo_charts.rb
Instance Method Summary collapse
- #comments_by_date ⇒ Object
- #files_by_date ⇒ Object
- #files_by_extension ⇒ Object
-
#initialize(repo) ⇒ RepoCharts
constructor
A new instance of RepoCharts.
- #lines_by_date ⇒ Object
- #lines_by_extension ⇒ Object
Constructor Details
#initialize(repo) ⇒ RepoCharts
5 6 7 |
# File 'lib/git_stats/stats_view/charts/repo_charts.rb', line 5 def initialize(repo) @repo = repo end |
Instance Method Details
#comments_by_date ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/git_stats/stats_view/charts/repo_charts.rb', line 49 def comments_by_date Chart.new do |f| f.date_chart( data: @repo.comments_count_by_date, title: :comments_by_date.t, y_text: :comments.t ) end end |
#files_by_date ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/git_stats/stats_view/charts/repo_charts.rb', line 29 def files_by_date Chart.new do |f| f.date_chart( data: @repo.files_count_by_date, title: :files_by_date.t, y_text: :files.t ) end end |
#files_by_extension ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/git_stats/stats_view/charts/repo_charts.rb', line 9 def files_by_extension Chart.new do |f| f.column_hash_chart( data: @repo.files_by_extension_count, title: :files_by_extension.t, y_text: :files.t ) end end |
#lines_by_date ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/git_stats/stats_view/charts/repo_charts.rb', line 39 def lines_by_date Chart.new do |f| f.date_chart( data: @repo.lines_count_by_date, title: :lines_by_date.t, y_text: :lines.t ) end end |
#lines_by_extension ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/git_stats/stats_view/charts/repo_charts.rb', line 19 def lines_by_extension Chart.new do |f| f.column_hash_chart( data: @repo.lines_by_extension, title: :lines_by_extension.t, y_text: :lines.t ) end end |