Module: RuboCop::OrderedMethods

Defined in:
lib/rubocop/ordered_methods.rb

Overview

Our namespace

Constant Summary collapse

PROJECT_ROOT =
Pathname.new(__dir__).parent.parent.expand_path.freeze
CONFIG_DEFAULT =
PROJECT_ROOT.join('config', 'default.yml').freeze

Class Method Summary collapse

Class Method Details

.inject_defaults!Object



9
10
11
12
13
14
15
16
# File 'lib/rubocop/ordered_methods.rb', line 9

def self.inject_defaults!
  path = CONFIG_DEFAULT.to_s
  hash = ConfigLoader.send(:load_yaml_configuration, path)
  config = Config.new(hash, path)
  puts "configuration from #{path}" if ConfigLoader.debug?
  config = ConfigLoader.merge_with_default(config, path)
  ConfigLoader.instance_variable_set(:@default_configuration, config)
end