lib/inch/cli/sparkline_helper.rb in inch-0.5.0.rc3 vs lib/inch/cli/sparkline_helper.rb in inch-0.5.0.rc4

- old
+ new

@@ -1,12 +1,12 @@ module Inch module CLI module SparklineHelper - def grade_lists_sparkline(_grade_lists) - grade_lists = _grade_lists.reverse - list = grade_lists.map { |r| r.objects.size } - __sparkline(list, grade_lists) + def grade_lists_sparkline(grade_lists) + new_grade_lists = grade_lists.reverse + list = new_grade_lists.map { |r| r.objects.size } + __sparkline(list, new_grade_lists) end def grades_sparkline(objects) grades = {} objects.each do |o| @@ -19,12 +19,12 @@ __sparkline(list, grade_lists) end def __sparkline(list, grade_lists) sparkline = Sparkr::Sparkline.new(list) - sparkline.format do |tick, count, index| + sparkline.format do |tick, _count, index| t = tick.color(grade_lists[index].color) - index == 0 ? t + ' ' : t + index == 0 ? t + " " : t end end end end end