Class: Inch::CLI::Command::Output::Suggest

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

Constant Summary collapse

FILE_COLOR =

TODO: store all colors somewhere

:dark
RANGE_LABELS =
{
  A: 'Nearly perfect:',
  B: 'Properly documented, could be improved:',
  C: 'Not properly documented:',
  U: 'Undocumented:'
}

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, #ui

Methods included from TraceHelper

#ui

Constructor Details

#initialize(options, relevant_objects, objects_to_display, grade_lists, files) ⇒ Suggest

Returns a new instance of Suggest

Parameters:



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/inch/cli/command/output/suggest.rb', line 26

def initialize(options, relevant_objects, objects_to_display,
               grade_lists, files)
  @options = options
  @objects = objects_to_display
  @relevant_objects = relevant_objects
  @grade_lists = grade_lists
  @files = files

  if objects.empty?
    display_no_objects_hint
  else
    display_list
    display_files
    display_distribution
  end
end

Instance Attribute Details

#filesObject (readonly)

Returns the value of attribute files



10
11
12
# File 'lib/inch/cli/command/output/suggest.rb', line 10

def files
  @files
end

#objectsObject (readonly)

Returns the value of attribute objects



10
11
12
# File 'lib/inch/cli/command/output/suggest.rb', line 10

def objects
  @objects
end