sax_stream 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/lib/sax_stream/internal/field_mapping.rb +8 -1
- metadata +6 -5
data/README.markdown
CHANGED
@@ -11,13 +11,20 @@ module SaxStream
|
|
11
11
|
if value && @parser
|
12
12
|
value = @parser.parse(value)
|
13
13
|
end
|
14
|
-
object
|
14
|
+
if object.respond_to?(setter_method)
|
15
|
+
object.send(setter_method, value)
|
16
|
+
else
|
17
|
+
object[@name] = value
|
18
|
+
end
|
15
19
|
end
|
16
20
|
|
17
21
|
def handler_for(name, collector, handler_stack, parent_object)
|
18
22
|
end
|
19
23
|
|
20
24
|
private
|
25
|
+
def setter_method
|
26
|
+
"#{@name}=".to_sym
|
27
|
+
end
|
21
28
|
|
22
29
|
def process_conversion_type(as)
|
23
30
|
if as
|
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.
|
4
|
+
version: 0.2.0
|
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-
|
12
|
+
date: 2012-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
16
|
-
requirement: &
|
16
|
+
requirement: &70267973114600 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,8 +21,9 @@ dependencies:
|
|
21
21
|
version: 1.4.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
description:
|
24
|
+
version_requirements: *70267973114600
|
25
|
+
description: A streaming XML parser which builds objects and passes them to a collecter
|
26
|
+
as they are ready. Based upon Nokogiri SAX parsing functionality.
|
26
27
|
email:
|
27
28
|
- craig@craigambrose.com
|
28
29
|
executables: []
|