Class: Inch::CLI::Command::List

Inherits:
BaseList show all
Defined in:
lib/inch/cli/command/list.rb

Direct Known Subclasses

Stats, Suggest

Constant Summary

Constants inherited from Base

Base::EXIT_STATUS_SUCCESS

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

#exit_status, #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/list.rb', line 10

def description
  'Lists all objects with their results'
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
# File 'lib/inch/cli/command/list.rb', line 23

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

#usageObject



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

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