Class: Inch::CLI::Command::BaseList Abstract

Inherits:
Base
  • Object
show all
Defined in:
lib/inch/cli/command/base_list.rb

Overview

This class is abstract.

Base class for Command objects concerned with lists of objects

Commands subclassing from this class are called with an optional list of paths in the form:

$ inch COMMAND [paths] [options]

Instance Attribute Summary collapse

Attributes inherited from Base

#codebase

Instance Method Summary collapse

Methods inherited from Base

#description, #initialize, #name, register_command_as, run, #run, #usage

Methods included from TraceHelper

#ui

Constructor Details

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

Instance Attribute Details

#objectsObject

Returns the value of attribute objects.



13
14
15
# File 'lib/inch/cli/command/base_list.rb', line 13

def objects
  @objects
end

Instance Method Details

#prepare_codebase(*args) ⇒ void

This method returns an undefined value.

Prepares the list of objects and grade_lists, parsing arguments and running the source parser.

Parameters:

  • *args (Array<String>)

    the list of arguments.



20
21
22
23
24
25
26
# File 'lib/inch/cli/command/base_list.rb', line 20

def prepare_codebase(*args)
  @options.parse(args)
  @options.verify

  config = Config::Codebase.new(@options.paths, @options.excluded)
  @codebase = ::Inch::Codebase.parse(Dir.pwd, config)
end