serialize_yaml2json 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serialize_yaml2json/version.rb +1 -1
- data/lib/serialize_yaml2json.rb +1 -1
- 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: f1c63053c753cb5b33e5332ec4a11ee4545f045f
|
4
|
+
data.tar.gz: fb5dbe5d682bbf7155c448b8dcf3c1711b2c0cbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d76f9ece3db7db6228d622ec333760d2128b91548f552a3c40b7303b7c26422a0bcaa32bce20c51e5e1217af9d4d16856551ba4809439edb1ef6b2778f8ac02
|
7
|
+
data.tar.gz: 292a29b4eb082eb87f4541430d302340a7d007ad252f216c657ceaa1059d626dc037d5baaba6d049fbca62702f96ed571e6ce972027e6258f8c66eee51bc66ef
|
data/lib/serialize_yaml2json.rb
CHANGED
@@ -11,7 +11,7 @@ module SerializeYAML2JSON
|
|
11
11
|
|
12
12
|
def self.load(yaml_or_json)
|
13
13
|
if yaml_or_json.is_a?(String) && yaml_or_json =~ /^---/
|
14
|
-
obj = ::
|
14
|
+
obj = ::YAML.load(yaml_or_json)
|
15
15
|
else
|
16
16
|
obj = ::ActiveRecord::Coders::JSON.load(yaml_or_json)
|
17
17
|
end
|