dxlite 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/dxlite.rb +17 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6268d88624bc2c37694a40bcd196ef5653e67ee4f49c2e3aa57762e0c24eaf74
|
|
4
|
+
data.tar.gz: ff5277f2debc53311cc5b4d59eebb04d568199ff28df0e77bf4a731ddc89408d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b639ab519450eee10073783acdcf0ed5c6cdf3013c54fb5251e06dc30f85147629d90572de01e322861e16443542e26f124390f3616b47c327191aafbed78da
|
|
7
|
+
data.tar.gz: 36fc53ce6d3bb42ee0c07bd072b19cd83a61a72445b63f3c8b8de98dd20dc061cca69e71e1987ae0ead27d23286a901e719807f473b9e0b8bb25795deec647a1
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/dxlite.rb
CHANGED
|
@@ -118,6 +118,23 @@ class DxLite
|
|
|
118
118
|
|
|
119
119
|
alias to_a records
|
|
120
120
|
|
|
121
|
+
def to_xml()
|
|
122
|
+
|
|
123
|
+
root_name = schema()[/^\w+/]
|
|
124
|
+
record_name = schema()[/(?<=\/)[^\(]+/]
|
|
125
|
+
|
|
126
|
+
h = {
|
|
127
|
+
root_name.to_sym =>
|
|
128
|
+
{
|
|
129
|
+
summary: @summary,
|
|
130
|
+
records: @records.map {|h| {record_name.to_sym => h} }
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
Rexle.new(RexleBuilder.new(h, debug: false).to_a).xml pretty: true
|
|
135
|
+
|
|
136
|
+
end
|
|
137
|
+
|
|
121
138
|
# Updates a record from an id and a hash containing field name and field value.
|
|
122
139
|
# dynarex.update 4, name: Jeff, age: 38
|
|
123
140
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|