recollect-array 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 6c60eb4e7c1f4cdbb94be9a3dd9cf0118a990e6b0aea89e238b32490a8557354
4
- data.tar.gz: 4f8a4c8f5311d192e62cc539fdc5bf4274fed94def9ee3e3ea524de7e02a7dc4
3
+ metadata.gz: b0e4b341fd0128d11eebe856242f5a58e4fe2fde5d52a1b32e5ab7677cb87eb0
4
+ data.tar.gz: 9dd9dfb0d30ea7d4a5005f9abda3e2123a6716f52bc7e8b65b4ab4e1b7f2909d
5
5
  SHA512:
6
- metadata.gz: fb8f5e5fa178a2981d77f79d3727889062ffbce756b3dc354c50e62fe42df51c8bed60b20cfbd196127b06ea5222e25ec9d42bee2e95577bf5b901a6a6474029
7
- data.tar.gz: 60d86ca9e454898bc7cc981eafc80a7e2411a326141ee291dea52f4c39ca83e96719ffb11ec96e4195c6189f4a2f54298b0c888516827a574ff8356acfcff25b
6
+ metadata.gz: f456880a49863da46af5ddf3776a6f3997141207b42b4f327235f9498ce78ad65d056eb20794f8bb690ee6f86a3e4084c947cf186319fc2e3b7d2a5f5eb87127
7
+ data.tar.gz: 790347aba973043fd253fb00eff346421c7eb263c0672d3e991b33eaf03ec5a04ea0ea1d0d24a87fb54caf11683bdc698fb395e96718a2130c2ef149fd581607
@@ -44,9 +44,9 @@ module Recollect
44
44
  end
45
45
  else
46
46
  parts = key.to_s.split('_')
47
- predicate = parts.pop
47
+ predicate = parts.size == 1 ? :eq : parts.pop
48
48
  iteratee = parts.join('_')
49
- klass = Predicate.call(predicate || 'eq')
49
+ klass = Predicate.call(predicate)
50
50
 
51
51
  next unless !!klass
52
52
 
@@ -68,7 +68,7 @@ module Recollect
68
68
  start: Startify, notstart: NotStartify, not_start: NotStartify,
69
69
  end: Endify, notend: NotEndify, not_end: NotEndify,
70
70
  in: Included, notin: NotIncluded, not_in: NotIncluded
71
- }[named.to_sym]
71
+ }[named.to_sym || :eq]
72
72
  end
73
73
  private_constant :Predicate
74
74
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Recollect
4
4
  module Array
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recollect-array
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thadeu Esteves