pack_api 1.0.11 → 1.0.12
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/pack_api/querying/dynamic_enum_filter.rb +8 -1
- data/lib/pack_api/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: c66fe371350245afa91cfa038ffc0ab62ef59455a8251dbb7ff1461211299f9f
|
|
4
|
+
data.tar.gz: 89ebb63e52330e78f940bf5c8104793f8b5ceadb317ed67fb4a43c8b3f781626
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 53a7ea4535c32a9047d77d85399eb1e30b44d1d3f3bd4b31b8ecdd5ca9829d0892785bb35b47f60f45251b6f475175583492225eda8c76c46325681b22982979
|
|
7
|
+
data.tar.gz: c10c5ffeded718d3cfad0ad9835d2630be7936b8ac0569bbbe014ef5bdf66696ef4ea0c70947e3126b07d9f5d1f517a86ddbd838699822a26149f7abc7ae6ecb
|
|
@@ -6,10 +6,17 @@ module PackAPI::Querying
|
|
|
6
6
|
class_methods do
|
|
7
7
|
def type = :dynamic_enum
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
###
|
|
10
|
+
# Retrieve options for this filter based on user input.
|
|
11
|
+
# @param relation [ActiveRecord::Relation] The base relation to query against for options.
|
|
12
|
+
# @param search [String, nil] An optional search term to filter options by (using wildcard matching)
|
|
13
|
+
# @param value [String, Array<String>, nil] An optional value or array of values to filter options by (exact match)
|
|
14
|
+
def dynamic_options(relation:, search: nil, value: nil) = raise NotImplementedError
|
|
10
15
|
|
|
11
16
|
private
|
|
12
17
|
|
|
18
|
+
###
|
|
19
|
+
# Static filter options is an empty array.
|
|
13
20
|
def filter_options(**) = PackAPI::FrozenEmpty::ARRAY
|
|
14
21
|
end
|
|
15
22
|
end
|
data/lib/pack_api/version.rb
CHANGED