lab5 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lab5.rb +2 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30c8270c6d223fd328d36caf33be69dd985e29c8
|
4
|
+
data.tar.gz: d96e12a7628e62689f3a08d7baac960c0868a2aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 654686ec254f4a8b4fa82c543b0e534c4d45f574d8221ebdcaffcd28fd9cea2592d08f053243808a76a012c07c856573426d0082c27621d6cb00e331da576508
|
7
|
+
data.tar.gz: 38e1c8bab8718e19e7b35c40f80c7b90386422d95a3e7e882feda831b66c8560097db5da91e82e0c9b18b06451e8e1cc8607e4ddcc453b6310fc4975f3300e05
|
data/lib/lab5.rb
CHANGED
@@ -3,7 +3,7 @@ require 'xmlsimple'
|
|
3
3
|
|
4
4
|
class XmlSerializer
|
5
5
|
def self.xml_ser(array)
|
6
|
-
|
6
|
+
hash = array.map { |item| object_to_hash(item) }
|
7
7
|
XmlSimple.xml_out(array, { 'KeepRoot' => true })
|
8
8
|
end
|
9
9
|
|
@@ -22,8 +22,7 @@ class XmlSerializer
|
|
22
22
|
end
|
23
23
|
|
24
24
|
{
|
25
|
-
|
26
|
-
instance_variables: variables
|
25
|
+
object.class.name => variables
|
27
26
|
}
|
28
27
|
end
|
29
28
|
|