Module: Sapience::ConfigLoader
- Defined in:
- lib/sapience/config_loader.rb
Overview
This class represents the configuration of the RuboCop application and all its cops. A Config is associated with a YAML configuration file from which it was read. Several different Configs can be used during a run of the sapience program, if files in several directories are inspected.
Constant Summary collapse
- SAPIENCE_FILE =
"sapience.yml".freeze
- SAPIENCE_HOME =
File.realpath(File.join(File.dirname(__FILE__), "..", ".."))
- DEFAULT_FILE =
File.join(SAPIENCE_HOME, "config", "default.yml")
Class Method Summary collapse
Class Method Details
.load_from_file ⇒ Object
19 20 21 22 23 |
# File 'lib/sapience/config_loader.rb', line 19 def self.load_from_file file_path = config_file_path path = File.absolute_path(file_path) load_yaml_configuration(path) end |