strong_json 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/strong_json/types.rb +16 -0
- data/lib/strong_json/version.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: bf88492fb72b27293db582e0c533f523ebc9847e
|
4
|
+
data.tar.gz: 6d1fb792714bd945e8d8a587df0ce8f08a7b59a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04dce37728688528ef296cf732d87d4d17785d7d217536298a1ec0788002bd602c4c2ee4ae27621b70ccb197e4c725acf714b5ecdfab58a6bfdc189ab35a455d
|
7
|
+
data.tar.gz: a26a4cb4f300733f2136183fe4044171761fbe15d9611cf6f92ca6ed6b5c4d445a27b2f61212d53ebb115800ca73f463c0fcf2962398ecc677f9c54012d23f61
|
data/lib/strong_json/types.rb
CHANGED
@@ -35,5 +35,21 @@ class StrongJSON
|
|
35
35
|
def prohibited
|
36
36
|
StrongJSON::Type::Base.new(:prohibited)
|
37
37
|
end
|
38
|
+
|
39
|
+
def string?
|
40
|
+
optional(string)
|
41
|
+
end
|
42
|
+
|
43
|
+
def numeric?
|
44
|
+
optional(numeric)
|
45
|
+
end
|
46
|
+
|
47
|
+
def number?
|
48
|
+
optional(number)
|
49
|
+
end
|
50
|
+
|
51
|
+
def boolean?
|
52
|
+
optional(boolean)
|
53
|
+
end
|
38
54
|
end
|
39
55
|
end
|
data/lib/strong_json/version.rb
CHANGED