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

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

Direct Known Subclasses

Stats, Suggest

Instance Attribute Summary

Attributes inherited from Base

#source_parser

Instance Method Summary collapse

Methods inherited from BaseList

#initialize, #prepare_list

Methods inherited from Base

#initialize, #name, run

Methods included from TraceHelper

#debug, #trace, #trace_header

Constructor Details

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

Instance Method Details

#descriptionObject



5
6
7
# File 'lib/inch/cli/command/list.rb', line 5

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.



18
19
20
21
# File 'lib/inch/cli/command/list.rb', line 18

def run(*args)
  prepare_list(*args)
  Output::List.new(@options, objects, @ranges)
end

#usageObject



9
10
11
# File 'lib/inch/cli/command/list.rb', line 9

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