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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 332f6db7efb59c1ca7fef5a07295d33f682531bb
4
- data.tar.gz: dfe88c3afd902a7698b1911e2bad58fc0343b27a
3
+ metadata.gz: ef21bd5a0b59530ed922a361d069ba9c1a4a50cf
4
+ data.tar.gz: bc11cf6ca7d074535b126ca775e41a922c0e3fa9
5
5
  SHA512:
6
- metadata.gz: 06b680bdcd3e803987fc9466d0bcc10a1467f36c0aa69a64b18705c9666cf9eac4b9e8b2b37aca738fd12f3ab922b5429a36b227b207925577ce66797c9094a9
7
- data.tar.gz: 3ba38ef1ddf6b50f43fabb22bca09f7bc27c4bef470f48c8ff6958d97e3d0923fd4997ddc74bcef271af9a9ed0ca39fc07d4f9a70084462dc0c3f2431c307c65
6
+ metadata.gz: de91426b033b35c6e099fdde9f69fcb6462bbadc06020748d84bec9c002f673eb49d2a1a54ad6ca8bb4b177e4db3914d4c87044e22422512957cc2c83ebeee44
7
+ data.tar.gz: 5ef3c0e19b7ddacd0ce2c6e210bacd71dea255eef5928951880f78d99a06c43afda841be34888009ecf4536300d0e6fc5b1ccc516c233585a84d05eb7a8bbcf6
data/README.md CHANGED
@@ -58,6 +58,10 @@ filter_set.call(data)
58
58
  ## Changelog
59
59
 
60
60
  ```
61
+ * v0.3.1
62
+
63
+ - Extend DSL with PrefixFilter
64
+
61
65
  * v0.3.0
62
66
 
63
67
  - Added PrefixFilter
@@ -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
@@ -1,3 +1,3 @@
1
1
  module DataFilter
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
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.0
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-01 00:00:00.000000000 Z
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: