data_filter 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/data_filter/filter_set.rb +12 -0
- data/lib/data_filter/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef21bd5a0b59530ed922a361d069ba9c1a4a50cf
|
4
|
+
data.tar.gz: bc11cf6ca7d074535b126ca775e41a922c0e3fa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de91426b033b35c6e099fdde9f69fcb6462bbadc06020748d84bec9c002f673eb49d2a1a54ad6ca8bb4b177e4db3914d4c87044e22422512957cc2c83ebeee44
|
7
|
+
data.tar.gz: 5ef3c0e19b7ddacd0ce2c6e210bacd71dea255eef5928951880f78d99a06c43afda841be34888009ecf4536300d0e6fc5b1ccc516c233585a84d05eb7a8bbcf6
|
data/README.md
CHANGED
@@ -98,6 +98,18 @@ module DataFilter
|
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
+
# Adds a {DataFilter::PrefixFilter} to the filter set
|
102
|
+
#
|
103
|
+
# @param field_sym [Symbol] name of the data method we want
|
104
|
+
# to filter
|
105
|
+
# @option opts [Object] :by the value we want to use when
|
106
|
+
# filtering the data item
|
107
|
+
def prefix_filter(field_sym, opts = {})
|
108
|
+
if opts[:by]
|
109
|
+
@filters << PrefixFilter.new(field_sym, opts[:by])
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
101
113
|
# Adds a {DataFilter::KeywordFilter} to the filter set
|
102
114
|
#
|
103
115
|
# @param field_syms [Array<Symbol>] a collection of all of the data
|
data/lib/data_filter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_filter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Bodah
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -115,4 +115,3 @@ signing_key:
|
|
115
115
|
specification_version: 4
|
116
116
|
summary: an extensible DSL for filtering data sets
|
117
117
|
test_files: []
|
118
|
-
has_rdoc:
|