relaton-bib 1.11.0 → 1.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a787155aa8128f6bbd98734d80eb23d60d890f564b0357b3d79070659a1322eb
4
- data.tar.gz: 92f839bcc00d8346aece24347903e833268d6c89df5da8150e108f680ae171fa
3
+ metadata.gz: a2a973e714b86a5a78367ea697af8ba3eaa2861e571e3b035ec6ff411febc121
4
+ data.tar.gz: dabc25e318c346add35e69e383fa00762c5589e684983d708785a00d48a5d60e
5
5
  SHA512:
6
- metadata.gz: f9a7e7163e3d93cea465b269aea55a18e585fa65165512cfa383f05a081605c66680912d77b0a4878ff27690713cee8d8b28dc9bbb84bb2477cf854a799e1a23
7
- data.tar.gz: 017ea5aab785898a8ed574bc685a14006b2b60c936996a97b5b96e18746f1ac23d1dc43ebfd5886cec7416469e0a8843886277f8d4e5e4ade1cd907739318a2e
6
+ metadata.gz: 6690ae53c5056fd830923eb85b5c04f1b652a5bb46c7024ae9f5ecf6f97cebd1d58d57a8069191b349dae9f50a050abdc8eb78375baa7e2f3e23ac1a8ec6290a
7
+ data.tar.gz: a8fa5e09f9630117c05e3594796f5eb04a8f54c7af344a709a264c8e9be45ce951ec1fc9f25b971193d64e824368babef489c29509bd2356a4c627d8ac384c47
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.11.0".freeze
2
+ VERSION = "1.11.1".freeze
3
3
  end
@@ -401,21 +401,25 @@ module RelatonBib
401
401
  def localities(rel)
402
402
  rel.xpath("./locality|./localityStack").map do |lc|
403
403
  if lc.name == "locality"
404
- Locality.new lc[:type], lc.at("referenceFrom").text, lc.at("referenceTo")&.text
404
+ locality lc
405
405
  else
406
406
  LocalityStack.new(lc.xpath("./locality").map { |l| locality l })
407
407
  end
408
408
  end
409
409
  end
410
410
 
411
+ #
412
+ # Create Locality object from Nokogiri::XML::Element
413
+ #
411
414
  # @param loc [Nokogiri::XML::Element]
415
+ # @param klass [RelatonBib::Locality.class, RelatonBib::LocalityStack.class]
416
+ #
412
417
  # @return [RelatonBib::Locality]
413
418
  def locality(loc, klass = Locality)
414
- ref_to = (rt = loc.at("./referenceTo")) && LocalizedString.new(rt.text)
415
419
  klass.new(
416
420
  loc[:type],
417
- LocalizedString.new(loc.at("./referenceFrom").text),
418
- ref_to,
421
+ loc.at("./referenceFrom")&.text,
422
+ loc.at("./referenceTo")&.text,
419
423
  )
420
424
  end
421
425
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 1.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-10 00:00:00.000000000 Z
11
+ date: 2022-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug