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}" }

Constants inherited from Base

Base::PRIORITY_ARROWS, Base::PRIORITY_MAP

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SparklineHelper

#grades_sparkline, #ranges_sparkline

Methods inherited from Base

#priority_arrow

Methods included from TraceHelper

#debug, #trace, #trace_header

Constructor Details

#initialize(options, objects, ranges) ⇒ 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, ranges)
  @options = options
  @objects = objects
  @ranges = ranges

  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