Class: LinterChanges::Config
- Inherits:
-
Object
- Object
- LinterChanges::Config
- Extended by:
- T::Sig
- Defined in:
- lib/linter_changes/config.rb
Constant Summary collapse
- USER_CONFIG_PATH =
'.linter_changes.yml'
Class Method Summary collapse
Class Method Details
.load(config_file: USER_CONFIG_PATH) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/linter_changes/config.rb', line 11 def self.load config_file: USER_CONFIG_PATH config_file = File.join(Dir.pwd, config_file) user_config = File.exist?(config_file) ? YAML.load_file(config_file) : nil unless user_config raise StandardError.new 'No configuration file provided, you need the file .linter_changes.yml at the base of your proyect' end user_config end |