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
Returns a new instance of RepoCharts.
7 8 9 |
# File 'lib/git_stats/stats_view/charts/repo_charts.rb', line 7 def initialize(repo) @repo = repo end |
Instance Method Details
#comments_by_date ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'lib/git_stats/stats_view/charts/repo_charts.rb', line 51 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
31 32 33 34 35 36 37 38 39 |
# File 'lib/git_stats/stats_view/charts/repo_charts.rb', line 31 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
11 12 13 14 15 16 17 18 19 |
# File 'lib/git_stats/stats_view/charts/repo_charts.rb', line 11 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 |