class DeepPreloader::PolymorphicSpec
def merge!(other)
def merge!(other) case other when nil return when DeepPreloader::PolymorphicSpec other.specs_by_type.each do |k, v| if specs_by_type[k] specs_by_type[k].merge!(v) else specs_by_type[k] = v end end else raise ArgumentError.new("Cannot merge #{other.class.name} into #{self.inspect}") end self end