sax_stream 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sax_stream/internal/mapper_handler.rb +1 -0
- data/lib/sax_stream/mapper.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e83e373a7bc90e401eb641014f64d917ed014b5f
|
4
|
+
data.tar.gz: 387a4de3dbe6f51007307b95ffe43d73a6ec0895
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea9cc9d59e7024e2bc6710935db2cdc6d8eab4a8891a14dbdf311238d9f72bdd33b740dc553b666b7fe18e05f41b6cd8312cdda4aa147cde7df34ea55cffb3b5
|
7
|
+
data.tar.gz: 88af05872978bcef1b2467cdf5dfa388e1129a3dc2e59f2e60d1c2b48d2aeb1359215257e43d6297a6ce97f38ac0b7269ed3afae8804b0710a6e6a41c026515f
|
@@ -66,6 +66,7 @@ module SaxStream
|
|
66
66
|
def start_current_object(name, attrs)
|
67
67
|
if !@current_object && maps_node?(name)
|
68
68
|
@current_object = @mapper_class.new
|
69
|
+
@current_object.node_name = name
|
69
70
|
attrs.each do |key, value|
|
70
71
|
@mapper_class.map_attribute_onto_object(@current_object, key, value)
|
71
72
|
end
|
data/lib/sax_stream/mapper.rb
CHANGED
@@ -68,7 +68,7 @@ module SaxStream
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def maps_node?(name)
|
71
|
-
@node_name == name
|
71
|
+
@node_name == name || @node_name == '*'
|
72
72
|
end
|
73
73
|
|
74
74
|
def map_attribute_onto_object(object, key, value)
|
@@ -210,7 +210,11 @@ module SaxStream
|
|
210
210
|
end
|
211
211
|
|
212
212
|
def node_name
|
213
|
-
self.class.node_name
|
213
|
+
@node_name || self.class.node_name
|
214
|
+
end
|
215
|
+
|
216
|
+
def node_name=(value)
|
217
|
+
@node_name = value
|
214
218
|
end
|
215
219
|
|
216
220
|
def should_collect?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sax_stream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Craig Ambrose
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|