lib/isodoc/metadata_contributor.rb in isodoc-2.0.5.2 vs lib/isodoc/metadata_contributor.rb in isodoc-2.0.5.3
- old
+ new
@@ -3,13 +3,12 @@
def extract_person_names(authors)
authors.reduce([]) do |ret, a|
if a.at(ns("./name/completename"))
ret << a.at(ns("./name/completename")).text
else
- forenames = a.xpath(ns("./name/forename"))
- fn = forenames.each_with_object([]) { |f, m| m << f.text }
- surname = a&.at(ns("./name/surname"))&.text
- ret << "#{fn.join(' ')} #{surname}"
+ fn = a.xpath(ns("./name/forename"))
+ .each_with_object([]) { |f, m| m << f.text }
+ ret << "#{fn.join(' ')} #{a&.at(ns('./name/surname'))&.text}"
end
end
end
def extract_person_affiliations(authors)