Class: Inch::CLI::Command::Stats

Inherits:
List show all
Defined in:
lib/inch/cli/command/stats.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/stats.rb', line 10

def description
  'Show statistics'
end

#run(*args) ⇒ Object


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

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

#usageObject


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

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