Class: Devtools::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/devtools/config.rb

Overview

Abstract base class of tool configuration

Direct Known Subclasses

Devtools, Flay, Flog, Mutant, Reek, Rubocop, Yardstick

Defined Under Namespace

Classes: Devtools, Flay, Flog, Mutant, Reek, Rubocop, Yardstick

Constant Summary collapse

DEFAULT_CONFIG =

Represent no configuration

{}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ Project

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initialize object



42
43
44
# File 'lib/devtools/config.rb', line 42

def initialize(project)
  @project = project
end

Instance Attribute Details

#projectProject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return project

Returns:



34
35
36
# File 'lib/devtools/config.rb', line 34

def project
  @project
end

Instance Method Details

#config_fileString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return config path

Returns:

  • (String)


52
53
54
# File 'lib/devtools/config.rb', line 52

def config_file
  @config_file ||= project.config_dir.join(self.class::FILE).freeze
end