pragmatic_ql 0.2 → 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/pragmatic_ql/include_model.rb +11 -1
- data/lib/pragmatic_ql/params_parser.rb +1 -0
- data/lib/pragmatic_ql/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 715af39de3a12f58db1c9ff9d79a70b39cc852d7afaea345ea30ec992f86160e
|
4
|
+
data.tar.gz: fb7b868bbbe996baaccb89776a5223ee3e47f21dfe0bd7d83c4ee36c3fc1f5ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72c1f6b0e6e9b568c276178aa3e675ee96167d4a7d135223b2df17ac25b0cb28ab2647b4715eb7c61d6dd4779ac66eae86c98947e318603b18c5f061a05cb889
|
7
|
+
data.tar.gz: 06b266317e9d5b6dfe1aaa996483c8402a40596d4a693ee3dee111964b84d6cda204fddd1bfaee704162d44eff2d385905d019f53ee599b48a9b485760bd0b70
|
@@ -1,15 +1,24 @@
|
|
1
1
|
module PragmaticQL
|
2
2
|
class IncludeModel
|
3
|
+
attr_reader :hooks
|
4
|
+
|
3
5
|
def initialize(include_hash)
|
4
6
|
@include_hash = include_hash
|
7
|
+
@hooks = []
|
5
8
|
end
|
6
9
|
|
7
10
|
def for(node_name)
|
11
|
+
hooks.each { |hook| hook.for(node_name) }
|
12
|
+
|
8
13
|
node_hash = @include_hash.fetch(node_name.to_sym) { {} }
|
9
|
-
IncludeModel.new(node_hash)
|
14
|
+
new_im = IncludeModel.new(node_hash)
|
15
|
+
hooks.each { |hook| new_im.hooks << hook }
|
16
|
+
new_im
|
10
17
|
end
|
11
18
|
|
12
19
|
def inclusive_of?(key_name)
|
20
|
+
hooks.each { |hook| hook.inclusive_of?(key_name) }
|
21
|
+
|
13
22
|
level_keys.include?(key_name.to_sym)
|
14
23
|
end
|
15
24
|
|
@@ -30,6 +39,7 @@ module PragmaticQL
|
|
30
39
|
end
|
31
40
|
|
32
41
|
def or(other)
|
42
|
+
hooks.each { |hook| hook.or(other) }
|
33
43
|
self.empty? ? other : self
|
34
44
|
end
|
35
45
|
|
data/lib/pragmatic_ql/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pragmatic_ql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Valent
|
@@ -10,10 +10,10 @@ authors:
|
|
10
10
|
- Anas Alaoui
|
11
11
|
- Alexander Sidorenko
|
12
12
|
- Matthijs Hovelynck
|
13
|
-
autorequire:
|
13
|
+
autorequire:
|
14
14
|
bindir: exe
|
15
15
|
cert_chain: []
|
16
|
-
date:
|
16
|
+
date: 2022-01-14 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: activesupport
|
@@ -104,7 +104,7 @@ homepage: https://github.com/Pobble/pragmatic_ql
|
|
104
104
|
licenses:
|
105
105
|
- MIT
|
106
106
|
metadata: {}
|
107
|
-
post_install_message:
|
107
|
+
post_install_message:
|
108
108
|
rdoc_options: []
|
109
109
|
require_paths:
|
110
110
|
- lib
|
@@ -119,8 +119,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
|
-
rubygems_version: 3.2.
|
123
|
-
signing_key:
|
122
|
+
rubygems_version: 3.2.32
|
123
|
+
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: Simple query language for JSON based APIs
|
126
126
|
test_files: []
|