pb_core 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pb_core/v2/base.rb +13 -4
- data/lib/pb_core/version.rb +1 -1
- metadata +3 -3
data/lib/pb_core/v2/base.rb
CHANGED
@@ -48,7 +48,16 @@ module PBCore
|
|
48
48
|
|
49
49
|
e = nil
|
50
50
|
Array(values).each{|v|
|
51
|
-
e = l.detect
|
51
|
+
e = l.detect do |i|
|
52
|
+
# puts "detect: #{v.inspect} #{v.class.name} #{i.inspect}"
|
53
|
+
case v.class.name
|
54
|
+
when 'Regexp'
|
55
|
+
# puts "match: #{v} #{element_value(i, atr)}"
|
56
|
+
v =~ element_value(i, atr)
|
57
|
+
else
|
58
|
+
element_value(i, atr) == standardize(v)
|
59
|
+
end
|
60
|
+
end
|
52
61
|
break if e
|
53
62
|
}
|
54
63
|
e = l.first if use_first && e.nil?
|
@@ -145,8 +154,8 @@ module PBCore
|
|
145
154
|
end
|
146
155
|
|
147
156
|
class Relation < PBCore::V2::Base
|
148
|
-
element '
|
149
|
-
element '
|
157
|
+
element 'pbcoreRelationType', :as => :type, :class => PBCore::V2::Type
|
158
|
+
element 'pbcoreRelationIdentifier', :as => :identifier, :class => PBCore::V2::Identifier
|
150
159
|
end
|
151
160
|
|
152
161
|
class CoverageInfo < PBCore::V2::Base
|
@@ -220,7 +229,7 @@ module PBCore
|
|
220
229
|
end
|
221
230
|
|
222
231
|
class Annotation < PBCore::V2::Base
|
223
|
-
attribute :annotationType, :as => :
|
232
|
+
attribute :annotationType, :as => :type
|
224
233
|
attribute :ref
|
225
234
|
value :value
|
226
235
|
end
|
data/lib/pb_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pb_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -78,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
78
|
version: '0'
|
79
79
|
segments:
|
80
80
|
- 0
|
81
|
-
hash: -
|
81
|
+
hash: -2261759994973944842
|
82
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
87
|
version: '0'
|
88
88
|
segments:
|
89
89
|
- 0
|
90
|
-
hash: -
|
90
|
+
hash: -2261759994973944842
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
93
|
rubygems_version: 1.8.23
|