rixml 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rixml_document/node.rb +8 -1
- data/lib/rixml_document/organization_id.rb +2 -1
- data/rixml.gemspec +2 -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: 39a54d4cfd789af298b2e87028cba0a17b6ab66c
|
4
|
+
data.tar.gz: 62154eff3bc6e210eb17c9ea04494a0394485a77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ade63c9f849c21d50c5995bb86bbeea76052382367cc5caf8a48afab08d34755d19af5e863383da795b12885faaaeb61aec19acab36f7fce1c698c9a3f41654
|
7
|
+
data.tar.gz: fb27afdc9bf08a0779d08086c83d7458cc52ec1fd5255d68c9bdc9ba6803f8dcfdf58e2e50ed8024812c94bd4b231d3e020da6a0fd3f90976a13951194a14822
|
data/lib/rixml_document/node.rb
CHANGED
@@ -5,7 +5,8 @@ module RixmlDocument
|
|
5
5
|
hash = {}
|
6
6
|
attributes = self.class.instance_variable_get(:@attributes)
|
7
7
|
elements = self.class.instance_variable_get(:@elements)
|
8
|
-
|
8
|
+
content = retrieve_content_tag
|
9
|
+
(attributes.to_a + elements.to_a + content.to_a).each do |k, _|
|
9
10
|
value = send(k)
|
10
11
|
hash[k] = serialize_attribute(value)
|
11
12
|
end
|
@@ -14,6 +15,12 @@ module RixmlDocument
|
|
14
15
|
|
15
16
|
private
|
16
17
|
|
18
|
+
def retrieve_content_tag
|
19
|
+
content = self.class.instance_variable_get(:@content)
|
20
|
+
return {} if content.nil?
|
21
|
+
{ content.name.to_sym => content }
|
22
|
+
end
|
23
|
+
|
17
24
|
def serialize_attribute(attribute)
|
18
25
|
if attribute.is_a?(Array)
|
19
26
|
attribute.map { |a| serialize_attribute(a) }
|
data/rixml.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'rixml'
|
4
|
-
s.version = '0.5.
|
5
|
-
s.date = '2017-10-
|
4
|
+
s.version = '0.5.3'
|
5
|
+
s.date = '2017-10-18'
|
6
6
|
s.summary = 'RIXML Parser'
|
7
7
|
s.description = 'Parse RIXML files'
|
8
8
|
s.homepage = 'https://github.com/AlphaExchange/rixml'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rixml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Correia Santos
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-10-
|
12
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|