lib/dwc-archive/classification_normalizer.rb in dwc-archive-0.7.7 vs lib/dwc-archive/classification_normalizer.rb in dwc-archive-0.7.8

- old
+ new

@@ -43,15 +43,23 @@ def add_vernacular_name_string(name_string) @vernacular_name_strings[name_string] = 1 unless @vernacular_name_strings[name_string] end - def name_strings - @name_strings.keys + def name_strings(opts = {with_hash: false}) + if opts[:with_hash] + @name_strings + else + @name_strings.keys + end end - def vernacular_name_strings - @vernacular_name_strings.keys + def vernacular_name_strings(opts = {with_hash: false}) + if opts[:with_hash] + @vernacular_name_strings + else + @vernacular_name_strings.keys + end end def normalize(opts = {:with_canoical_names => true}) @with_canonical_names = opts[:with_canonical_names] != nil ? opts[:with_canonical_names] : true DarwinCore.logger_write(@dwc.object_id, "Started normalization of the classification")