msfl 1.2.0.dev2 → 1.2.0.dev3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/msfl/datasets/base.rb +18 -0
- data/msfl.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92776017e13b2f1677d282efee338f57475e0c6b
|
4
|
+
data.tar.gz: cf7f80e1c004e70bfa209cedfa9867a87277b52b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cb498ae6117a7a53f7899f0bab6e56d2bf87c64dce04aa44d1675709729e9fded2785fff74d1b122c13754239fac4e9b121bd2c75a41be4bbe67969161da95c
|
7
|
+
data.tar.gz: e899946daebe34c207f9ce94dd9dd4f698e84f1a277d2b4c8701f50325e942a026c877b4cc2c2631056fe426789c0ca727b408e60c46d1c2afbb12c6de1f24f1
|
data/lib/msfl/datasets/base.rb
CHANGED
@@ -50,6 +50,20 @@ module MSFL
|
|
50
50
|
raise NoMethodError, "Descendants of MSFL::Datasets::Base are required to implement the #fields method"
|
51
51
|
end
|
52
52
|
|
53
|
+
# The descendant class SHOULD override this method, in future versions of MSFL it is execpted to
|
54
|
+
# become a MUST for descendants to override.
|
55
|
+
#
|
56
|
+
# The method defines an array of symbols, indicating the names of foreign datasets that this data
|
57
|
+
# set supports filtering on
|
58
|
+
#
|
59
|
+
# Example a Person might have a foreign of :location where the Location dataset should be loaded and
|
60
|
+
# used for evaluating filters inside of the foreign (this prevents having to duplicate expression semantics
|
61
|
+
# across many datasets - the Location semantics are defined only in the Location dataset and loaded in
|
62
|
+
# when needed by other datasets)
|
63
|
+
def foreigns
|
64
|
+
[]
|
65
|
+
end
|
66
|
+
|
53
67
|
# The descendant class may override this method to control the operators that are supported for the dataset
|
54
68
|
# - Note that this can only be used to reduce the number of supported operators (you can't add new operators
|
55
69
|
# here, without first adding them to MSFL::Validators::Definitions::HashKey#hash_key_operators)
|
@@ -153,6 +167,10 @@ module MSFL
|
|
153
167
|
def value_conforms?(value, field, errors = [])
|
154
168
|
true
|
155
169
|
end
|
170
|
+
|
171
|
+
def foreign?(field)
|
172
|
+
|
173
|
+
end
|
156
174
|
end
|
157
175
|
end
|
158
176
|
end
|
data/msfl.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'msfl'
|
3
|
-
s.version = '1.2.0.
|
3
|
+
s.version = '1.2.0.dev3'
|
4
4
|
s.date = '2015-05-12'
|
5
5
|
s.summary = "MSFL in Ruby"
|
6
6
|
s.description = "Serializers, validators, and other tasty goodness for the Mattermark Semantic Filter Language in Ruby."
|