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