Module: RuboCop::OrderedMethods

Defined in:
lib/rubocop/ordered_methods.rb,
lib/rubocop/ordered_methods/plugin.rb,
lib/rubocop/ordered_methods/version.rb

Overview

Our namespace

Defined Under Namespace

Classes: Plugin

Constant Summary collapse

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

Class Method Summary collapse

Class Method Details

.inject_defaults!Object



14
15
16
17
18
19
20
21
# File 'lib/rubocop/ordered_methods.rb', line 14

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