simple_bioc 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 898191c87e6e9a0a46e7b7c6638370cffc0a5d25
4
- data.tar.gz: 1bf48d3b2bdee74d55beefe4769a7376d066b8ce
3
+ metadata.gz: 749f96d8570d8e0d152fd9098211170fddaa5dc8
4
+ data.tar.gz: e8c8587e689da368c10e641f3b6cf5157efabe03
5
5
  SHA512:
6
- metadata.gz: 742f7bcc0521d1f4e92d1fd2027e613c9d959a272da3376660746edcd9fce4013ef43978859846e63616702d65ce87e46fb1f5c9e3c8de7ac312a072972ec22b
7
- data.tar.gz: 52447cdb3c44fb1e13cafe44b45ad72139cde34322e920bdd039babc420c4f68fdf985a29154bb1fbfda078bf1f6d9a35879fb72776f0772d27f6dccd76d7961
6
+ metadata.gz: 325a9c9e9d23c896b57e6615c8efcc25bcffb678294d1b41eb0927881f39ef687611f4fa09ca162863c149e0114ac74dc18d611f7256f796b176a95fdf7c511f
7
+ data.tar.gz: c04562d884872cc1bda49c94dd632c943898684707dd019eeb73f3218a07b49f92571f122e7393c5a817dba6ac42aff60530e3c72ed3f111ede68b353bcbe573
@@ -52,7 +52,8 @@ module BioCReader
52
52
  ret.each do |node|
53
53
  instance = target_class.new(obj)
54
54
  ret = send(:"read_#{name}", node, instance, options)
55
- obj.instance_variable_get(:"@#{name}s") << instance if ret
55
+ arr = obj.instance_variable_get(:"@#{name}s")
56
+ arr << instance if ret && !arr.nil?
56
57
  end
57
58
  end
58
59
 
@@ -89,6 +89,7 @@ module BioCWriter
89
89
  end
90
90
 
91
91
  def write_location(xml, location)
92
+ next if location.nil?
92
93
  if location.original_offset.nil? || location.original_offset == location.offset
93
94
  xml.location(:offset => location.offset, :length => location.length)
94
95
  else
@@ -7,6 +7,7 @@ module SimpleBioC
7
7
  positions = find_all_locations(obj, a.text)
8
8
  next a.locations.nil?
9
9
  a.locations.each do |l|
10
+ next if l.nil?
10
11
  l.original_offset = l.offset.to_i if l.original_offset.nil?
11
12
  l.offset = choose_offset_candidate(l.offset, positions)
12
13
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleBioC
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_bioc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dongseop Kwon