Module: CodePoetry
- Defined in:
- lib/code_poetry.rb,
lib/code_poetry/cli.rb,
lib/code_poetry/stat.rb,
lib/code_poetry/method.rb,
lib/code_poetry/railtie.rb,
lib/code_poetry/version.rb,
lib/code_poetry/formatter.rb,
lib/code_poetry/calculator.rb,
lib/code_poetry/warning_scanner.rb,
lib/code_poetry/complexity_calculator.rb,
lib/code_poetry/duplication_calculator.rb
Defined Under Namespace
Modules: Formatter
Classes: CLI, Calculator, ComplexityCalculator, Duplication, DuplicationCalculator, Method, Railtie, Smell, Stat, WarningScanner
Constant Summary
collapse
- VERSION =
'0.2.0'
Class Method Summary
collapse
Class Method Details
.coverage_path ⇒ Object
17
18
19
20
21
|
# File 'lib/code_poetry.rb', line 17
def coverage_path
coverage_path = File.expand_path('metrics', root)
FileUtils.mkdir_p coverage_path
coverage_path
end
|
.project_name ⇒ Object
23
24
25
26
|
# File 'lib/code_poetry.rb', line 23
def project_name
return @project_name if defined? @project_name
@project_name = File.basename(root.split('/').last).capitalize.gsub('_', ' ')
end
|
.root ⇒ Object
12
13
14
15
|
# File 'lib/code_poetry.rb', line 12
def root
return @root if defined? @root
@root = File.expand_path(Dir.getwd)
end
|