Class: Inch::CLI::Command::Output::Stats

Inherits:
Base
  • Object
show all
Includes:
SparklineHelper
Defined in:
lib/inch/cli/command/output/stats.rb

Constant Summary collapse

PRIORITY_COLORS =
[
  [213,212,211,210,210,209,209],
  [177],
  [203, 203, 204, 204, 205, 206, 207]
].flatten.map { |s| :"color#{s}" }

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SparklineHelper

#__sparkline, #grade_lists_sparkline, #grades_sparkline

Methods inherited from Base

#print_file_info, #priority_arrow

Methods included from TraceHelper

#ui

Constructor Details

#initialize(options, objects, grade_lists) ⇒ Stats

Returns a new instance of Stats.



19
20
21
22
23
24
25
# File 'lib/inch/cli/command/output/stats.rb', line 19

def initialize(options, objects, grade_lists)
  @options = options
  @objects = objects
  @grade_lists = grade_lists

  method("display_#{@options.format}").call
end

Instance Attribute Details

#objectsObject (readonly)

Returns the value of attribute objects.



11
12
13
# File 'lib/inch/cli/command/output/stats.rb', line 11

def objects
  @objects
end