sax_stream 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -61,6 +61,10 @@ module SaxStream
61
61
  @elements.length <= 1
62
62
  end
63
63
 
64
+ def length
65
+ @elements.length
66
+ end
67
+
64
68
  def path
65
69
  return nil if @elements.empty?
66
70
  @elements.map(&:name).compact.join('/')
@@ -64,7 +64,7 @@ module SaxStream
64
64
  private
65
65
 
66
66
  def start_current_object(name, attrs)
67
- if maps_node?(name)
67
+ if !@current_object && maps_node?(name)
68
68
  @current_object = @mapper_class.new
69
69
  attrs.each do |key, value|
70
70
  @mapper_class.map_attribute_onto_object(@current_object, key, value)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sax_stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-16 00:00:00.000000000 Z
12
+ date: 2012-04-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
16
- requirement: &70307155091780 !ruby/object:Gem::Requirement
16
+ requirement: &70295398456460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 1.5.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70307155091780
24
+ version_requirements: *70295398456460
25
25
  description: A streaming XML parser which builds objects and passes them to a collecter
26
26
  as they are ready. Based upon Nokogiri SAX parsing functionality.
27
27
  email: