182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
# File 'lib/inspec/rule.rb', line 182
def self.merge(dst, src)
if src.id != dst.id
return
end
sp = rule_id(src)
dp = rule_id(dst)
if sp != dp
return
end
dst.impact(src.impact) unless src.impact.nil?
dst.title(src.title) unless src.title.nil?
dst.desc(src.desc) unless src.desc.nil?
sc = checks(src)
dst.instance_variable_set(:@__checks, sc) unless sc.empty?
sr = skip_status(src)
set_skip_rule(dst, sr) unless sr.nil?
dst.instance_variable_set(:@__merge_count, merge_count(dst) + 1)
end
|