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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd8f26b87f7ddf2f3c951a19a24610abfe1bfac4f4da041568883cc371090895
4
- data.tar.gz: bbecf051c37ec9da1eae0920a6ec42c09d159feef1f2be734beaef2871af7410
3
+ metadata.gz: 247a0f8bf5424ac104e9c4b71a073c4b7a6e38399434dc57a9a3b13f40b72d0b
4
+ data.tar.gz: db54f6d86bab52b6f50bc09cc3aa42c4b2b9c00c10a484394de270bc4a1c8351
5
5
  SHA512:
6
- metadata.gz: 53bb5fd170e71b21687dadba5ab1ce6c5a81bcb1a4ede09e280103cd81693fb8e9f41a3a15af630b2d48b62f150f29c1f222d8308fff2636135c5653d9ca3da3
7
- data.tar.gz: 47c9621bfdeb542e625f2115eb96b7d1d14fdecfd5f6cefe62bd6f92be2703d7e3e7518e96df26af3c692fb5887ac08ebe26db38eaeae8a8cfb059eeb07de839
6
+ metadata.gz: aa084c1032e46b35a3330a5500bdf2a31dd19d57585ca7fd12bbd8c93083d1f2b5f9df1c53c68dd10ab53167d27fe8f4680cf4a7f8f8567f4e9dd3b279d13022
7
+ data.tar.gz: be8d2cc143b82614cd99ef6d0b38c2fcc756152a9856db840e04595f1d566d97e8c01f51caadcb7ba88ff9d00924f3ff1e048a821b9a08f50a164c3047b8aba5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.10
4
+
5
+ ### Added
6
+
7
+ * Added intersection and boolean literal support to `Camille::Syntax`
8
+
3
9
  ## 0.5.9
4
10
 
5
11
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- camille (0.5.9)
4
+ camille (0.5.10)
5
5
  rails (>= 6.1, < 8)
6
6
 
7
7
  GEM
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Camille
4
- VERSION = "0.5.9"
4
+ VERSION = "0.5.10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: camille
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9
4
+ version: 0.5.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - 辻彩