memorydb 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,6 +46,11 @@ module MemoryDb
46
46
  self
47
47
  end
48
48
 
49
+ def contains(field, value)
50
+ @filters << filter_factory.contains(field, value)
51
+ self
52
+ end
53
+
49
54
  def not_in(field, value)
50
55
  @filters << filter_factory.not_in(field, value)
51
56
  self
@@ -150,6 +150,7 @@ module MemoryDb
150
150
  when '<='; value && (value <= filter.value)
151
151
  when '>'; value && (value > filter.value)
152
152
  when '>='; value && (value >= filter.value)
153
+ when 'contains'; value && value.include?(filter.value)
153
154
  when 'in'; filter.value.include?(value)
154
155
  when '!in'; !filter.value.include?(value)
155
156
  when 'or'; filter.value.any? do |sub_filter|
@@ -43,6 +43,11 @@ module MemoryDb
43
43
  Filter.new(field, 'in', value.to_a)
44
44
  end
45
45
 
46
+ def contains(field, value)
47
+ assert_field!(field)
48
+ Filter.new(field, 'contains', value)
49
+ end
50
+
46
51
  def not_in(field, value)
47
52
  assert_field!(field)
48
53
  assert_to_a!('Exclusion', value)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memorydb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-01 00:00:00.000000000 Z
12
+ date: 2013-08-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake