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

Inherits:
List show all
Defined in:
lib/inch/cli/command/suggest.rb

Instance Attribute Summary

Attributes inherited from BaseList

#objects

Attributes inherited from Base

#codebase

Instance Method Summary collapse

Methods inherited from BaseList

#prepare_codebase

Methods inherited from Base

#initialize, #name, register_command_as, run

Methods included from TraceHelper

#ui

Constructor Details

This class inherits a constructor from Inch::CLI::Command::Base

Instance Method Details

#descriptionObject



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

def description
  'Suggests some objects to be documented (better)'
end

#run(*args) ⇒ void

This method returns an undefined value.

Runs the commandline utility, parsing arguments and displaying a list of objects

Parameters:

  • args (Array<String>)

    the list of arguments.



23
24
25
26
27
28
# File 'lib/inch/cli/command/suggest.rb', line 23

def run(*args)
  prepare_codebase(*args)
  context = API::Suggest.new(codebase, @options)
  Output::Suggest.new(@options, context.all_objects,
    context.objects, context.grade_lists, context.files)
end

#usageObject



14
15
16
# File 'lib/inch/cli/command/suggest.rb', line 14

def usage
  'Usage: inch suggest [paths] [options]'
end