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

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_to_display, relevant_objects, ranges, files) ⇒ Suggest

Returns a new instance of Suggest.

Parameters:



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

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

  if objects.empty?
    # TODO: show 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