lib/rubyXL/objects/relationships.rb in rubyXL-3.4.3 vs lib/rubyXL/objects/relationships.rb in rubyXL-3.4.4
- old
+ new
@@ -80,11 +80,14 @@
file_path = (base_file_name.dirname + file_path).cleanpath if file_path.relative?
klass = RubyXL::OOXMLRelationshipsFile.get_class_by_rel_type(rel.type)
if klass.nil? then
- puts "*** WARNING: storage class not found for #{rel.target} (#{rel.type})"
+ if !RubyXL.class_variable_get(:@@suppress_warnings) then
+ puts "*** WARNING: storage class not found for #{rel.target} (#{rel.type})"
+ end
+
klass = GenericStorageObject
end
puts "--> DEBUG:#{' ' * @@debug_indent}Loading #{klass} (#{rel.id}): #{file_path}" if @@debug_indent
@@ -202,10 +205,12 @@
end
end
def store_relationship(related_file, unknown = false)
self.generic_storage ||= []
- puts "WARNING: #{self.class} is not aware what to do with #{related_file.class}" if unknown
+ if unknown && !RubyXL.class_variable_get(:@@suppress_warnings) then
+ puts "WARNING: #{self.class} is not aware how to process #{related_file.class}"
+ end
self.generic_storage << related_file
end
end