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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2128b5dc66a473ba485b767362ef8662683074ff
4
- data.tar.gz: 64ba449057ed620532685b7a88d30ac66ade8821
3
+ metadata.gz: e83e373a7bc90e401eb641014f64d917ed014b5f
4
+ data.tar.gz: 387a4de3dbe6f51007307b95ffe43d73a6ec0895
5
5
  SHA512:
6
- metadata.gz: aca2c7f39fc0185f732b60f5639fe01fdf2973828438662d3cacfe99f82cd1442cf99f1d28b829f6b60055f79754c7d5eed684a895b9a1ae8e0c3ec4764e063e
7
- data.tar.gz: 15130ed1ca010b0981bcb97240564c8ea53795b2d0931a57da6170ef1c1ef9edfec9f3d787ba85a63301e099050c08e8a617df3a2dc8db335e7ddfec59fc8068
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
@@ -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.7
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-04 00:00:00.000000000 Z
11
+ date: 2014-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri