camille 0.5.9 → 0.5.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/lib/camille/syntax.rb +32 -0
- data/lib/camille/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: 247a0f8bf5424ac104e9c4b71a073c4b7a6e38399434dc57a9a3b13f40b72d0b
|
4
|
+
data.tar.gz: db54f6d86bab52b6f50bc09cc3aa42c4b2b9c00c10a484394de270bc4a1c8351
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa084c1032e46b35a3330a5500bdf2a31dd19d57585ca7fd12bbd8c93083d1f2b5f9df1c53c68dd10ab53167d27fe8f4680cf4a7f8f8567f4e9dd3b279d13022
|
7
|
+
data.tar.gz: be8d2cc143b82614cd99ef6d0b38c2fcc756152a9856db840e04595f1d566d97e8c01f51caadcb7ba88ff9d00924f3ff1e048a821b9a08f50a164c3047b8aba5
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/camille/syntax.rb
CHANGED
@@ -14,6 +14,10 @@ module Camille
|
|
14
14
|
def | other
|
15
15
|
Camille::Types::Union.new(Camille::Types::Object.new(self), other)
|
16
16
|
end
|
17
|
+
|
18
|
+
def & other
|
19
|
+
Camille::Types::Intersection.new(Camille::Types::Object.new(self), other)
|
20
|
+
end
|
17
21
|
end
|
18
22
|
|
19
23
|
refine ::Array do
|
@@ -71,5 +75,33 @@ module Camille
|
|
71
75
|
Camille::Types::Union.new(Camille::Types::StringLiteral.new(self), other)
|
72
76
|
end
|
73
77
|
end
|
78
|
+
|
79
|
+
refine TrueClass do
|
80
|
+
def [] key = NULL_VALUE
|
81
|
+
if key == NULL_VALUE
|
82
|
+
Camille::Types::BooleanLiteral.new(true)[]
|
83
|
+
else
|
84
|
+
super
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def | other
|
89
|
+
Camille::Types::Union.new(Camille::Types::BooleanLiteral.new(true), other)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
refine FalseClass do
|
94
|
+
def [] key = NULL_VALUE
|
95
|
+
if key == NULL_VALUE
|
96
|
+
Camille::Types::BooleanLiteral.new(false)[]
|
97
|
+
else
|
98
|
+
super
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def | other
|
103
|
+
Camille::Types::Union.new(Camille::Types::BooleanLiteral.new(false), other)
|
104
|
+
end
|
105
|
+
end
|
74
106
|
end
|
75
107
|
end
|
data/lib/camille/version.rb
CHANGED