lib/relaton_iec/data_parser.rb in relaton-iec-1.19.0 vs lib/relaton_iec/data_parser.rb in relaton-iec-1.19.1
- old
+ new
@@ -108,15 +108,15 @@
end
#
# Parse titles.
#
- # @return [Array<RelatonBib::TypedTitleString>] titles
+ # @return [RelatonBib::TypedTitleStringCollection] titles
#
def title
- @pub["title"].map do |t|
- RelatonBib::TypedTitleString.new(
- content: t["value"], language: t["lang"], script: lang_to_script(t["lang"]), type: "main",
+ @pub["title"].reduce(RelatonBib::TypedTitleStringCollection.new) do |a, t|
+ a + RelatonBib::TypedTitleString.from_string(
+ t["value"], t["lang"], lang_to_script(t["lang"])
)
end
end
#