uinit-type 0.1.5 → 0.1.6
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
- data/lib/uinit/type/context.rb +14 -17
- data/lib/uinit/type/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d2fa003157324858ef9690e02461f5a12891514570425c7356d1c6eef2027f2
|
4
|
+
data.tar.gz: b0e075b89b209a0c0aefbad71973d91da29fc8aba4adaecb6ed3f87e9051b1c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d437e365ed02140daa4da4b1d7524bfc4e560df4bf12eb3151bd7ddeb17d6d728d77af3d569c5f9cc82c0af52cd9e4b434b5e19216cad7ce7ad34b6cc0b16fcf
|
7
|
+
data.tar.gz: 91735badafaecd283b095cfa61c965655be2afc337bd3c0c4092a9195f365d520e9776e1af7b6a16b99eb54c430cd51aa63aa1bc433c0d73fb37031a00ecf01a
|
data/lib/uinit/type/context.rb
CHANGED
@@ -5,10 +5,7 @@ module Uinit
|
|
5
5
|
module Context
|
6
6
|
Nil = Const[nil].freeze
|
7
7
|
Boolean = (Const[true] | Const[false]).freeze
|
8
|
-
Str = String.freeze
|
9
8
|
Sym = TypeOf[Symbol].freeze
|
10
|
-
Int = Integer.freeze
|
11
|
-
Float = Float.freeze
|
12
9
|
Hsh = TypeOf[Hash].freeze
|
13
10
|
Arr = TypeOf[Array].freeze
|
14
11
|
|
@@ -52,6 +49,20 @@ module Uinit
|
|
52
49
|
TypeOf.new(type)
|
53
50
|
end
|
54
51
|
|
52
|
+
def string(**)
|
53
|
+
String.new(**)
|
54
|
+
end
|
55
|
+
alias str string
|
56
|
+
|
57
|
+
def integer(**)
|
58
|
+
Integer.new(**)
|
59
|
+
end
|
60
|
+
alias int integer
|
61
|
+
|
62
|
+
def float(**)
|
63
|
+
Float.new(**)
|
64
|
+
end
|
65
|
+
|
55
66
|
def nilable
|
56
67
|
Nil
|
57
68
|
end
|
@@ -63,20 +74,6 @@ module Uinit
|
|
63
74
|
end
|
64
75
|
alias bool boolean
|
65
76
|
|
66
|
-
def string
|
67
|
-
Str
|
68
|
-
end
|
69
|
-
alias str string
|
70
|
-
|
71
|
-
def integer
|
72
|
-
Int
|
73
|
-
end
|
74
|
-
alias int integer
|
75
|
-
|
76
|
-
def float
|
77
|
-
Float
|
78
|
-
end
|
79
|
-
|
80
77
|
def hash
|
81
78
|
Hsh
|
82
79
|
end
|
data/lib/uinit/type/version.rb
CHANGED