Class: RuboCop::Schema::CopInfoMerger

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop/schema/cop_info_merger.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(old, new) ⇒ CopInfoMerger

Returns a new instance of CopInfoMerger.



14
15
16
17
18
# File 'lib/rubocop/schema/cop_info_merger.rb', line 14

def initialize(old, new)
  @merged = old.dup
  @new = new
  merge
end

Instance Attribute Details

#mergedCopInfo (readonly)

Returns:



12
13
14
# File 'lib/rubocop/schema/cop_info_merger.rb', line 12

def merged
  @merged
end

Class Method Details

.merge(old, new) ⇒ CopInfo

Parameters:

Returns:



7
8
9
# File 'lib/rubocop/schema/cop_info_merger.rb', line 7

def self.merge(old, new)
  new(old, new).merged
end