dynamoid_advanced_where 1.0.0 → 1.0.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f415151e23b5baba11532ebc26bf31020983502dd979a41a49e262933bf4ea50
|
4
|
+
data.tar.gz: be4300fcbfe8db7056c2c0e0163f8573854434c3a40826476686243dc4cafd5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce2f7f1722ffbfb98bc4302495679d5511ef59b88f0b676850e77c20600bb7f19b728bdb0fd6bee8f385abd42947a9afb0b12ffd469165bb5ffaaeffeb5586fa
|
7
|
+
data.tar.gz: 69dd0f4ad676256f5e6b0d52decd79198f69aa7f03efec1602d87e8bebb5a133076b337a00d7c2ef91ac71b0d9bf48c599aef9f9d1cc097028762a07724e5e5e
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
|
3
4
|
module DynamoidAdvancedWhere
|
4
5
|
module Nodes
|
6
|
+
module Concerns
|
7
|
+
module SupportsLogicalAnd
|
8
|
+
def and(other_value)
|
9
|
+
AndNode.new(self, other_value)
|
10
|
+
end
|
11
|
+
alias & and
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# I know this is weird but it prevents a circular dependency
|
16
|
+
require_relative './not'
|
17
|
+
|
5
18
|
class AndNode < BaseNode
|
6
19
|
include Concerns::Negatable
|
7
20
|
attr_accessor :child_nodes
|
@@ -30,14 +43,5 @@ module DynamoidAdvancedWhere
|
|
30
43
|
end
|
31
44
|
alias & and
|
32
45
|
end
|
33
|
-
|
34
|
-
module Concerns
|
35
|
-
module SupportsLogicalAnd
|
36
|
-
def and(other_value)
|
37
|
-
AndNode.new(self, other_value)
|
38
|
-
end
|
39
|
-
alias & and
|
40
|
-
end
|
41
|
-
end
|
42
46
|
end
|
43
47
|
end
|
@@ -4,8 +4,23 @@ require 'forwardable'
|
|
4
4
|
|
5
5
|
module DynamoidAdvancedWhere
|
6
6
|
module Nodes
|
7
|
+
module Concerns
|
8
|
+
module Negatable
|
9
|
+
def negate
|
10
|
+
NotNode.new(sub_node: self)
|
11
|
+
end
|
12
|
+
alias ! negate
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
# I know this is weird but it prevents a circular dependency
|
17
|
+
require_relative './and_node'
|
18
|
+
require_relative './or_node'
|
19
|
+
|
7
20
|
class NotNode
|
8
21
|
extend Forwardable
|
22
|
+
include Concerns::SupportsLogicalAnd
|
23
|
+
include Concerns::SupportsLogicalOr
|
9
24
|
|
10
25
|
attr_accessor :sub_node
|
11
26
|
|
@@ -23,13 +38,5 @@ module DynamoidAdvancedWhere
|
|
23
38
|
end
|
24
39
|
end
|
25
40
|
|
26
|
-
module Concerns
|
27
|
-
module Negatable
|
28
|
-
def negate
|
29
|
-
NotNode.new(sub_node: self)
|
30
|
-
end
|
31
|
-
alias ! negate
|
32
|
-
end
|
33
|
-
end
|
34
41
|
end
|
35
42
|
end
|