146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
# File 'lib/inspec/rule.rb', line 146
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?
end
|