Class: Standard::Performance::BuildsRuleset

Inherits:
Object
  • Object
show all
Defined in:
lib/standard/performance/builds_ruleset.rb

Instance Method Summary collapse

Constructor Details

#initializeBuildsRuleset

Returns a new instance of BuildsRuleset.



7
8
9
10
11
# File 'lib/standard/performance/builds_ruleset.rb', line 7

def initialize
  @determines_yaml_path = DeterminesYamlPath.new
  @loads_yaml_with_inheritance = LoadsYamlWithInheritance.new
  @merges_upstream_metadata = LintRoller::Support::MergesUpstreamMetadata.new
end

Instance Method Details

#build(target_ruby_version) ⇒ Object



13
14
15
16
17
18
# File 'lib/standard/performance/builds_ruleset.rb', line 13

def build(target_ruby_version)
  @merges_upstream_metadata.merge(
    @loads_yaml_with_inheritance.load(@determines_yaml_path.determine(target_ruby_version)),
    @loads_yaml_with_inheritance.load(Pathname.new(Gem.loaded_specs["rubocop-performance"].full_gem_path).join("config/default.yml"))
  )
end