arel-extensions 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/arel-extensions.gemspec +1 -1
- data/lib/arel/attributes/key.rb +5 -0
- data/lib/arel/json_predications.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93c939760cdc803cc6bbedb950ebb9ce9ca39610
|
4
|
+
data.tar.gz: ff6576c5f315d326dbd4e25a7f76d06df2159a67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4808b1ca2d55f753f32952883252797135193882afd328456e410db83960db3ed21342eafd9639bb15e11b7c33913bd931cbe3d60d83d3edbf71d400a2f40149
|
7
|
+
data.tar.gz: f071b4ea0c5f8887d283afed3be26be4a2e9cc361a13ea1b62fec88c051d8575b213ad5e4fc773be7618fc2ced3c510afc882700b4a4c57e9f3287d4c7dd205a
|
data/arel-extensions.gemspec
CHANGED
data/lib/arel/attributes/key.rb
CHANGED
@@ -23,5 +23,15 @@ module Arel
|
|
23
23
|
Arel::Attributes::Cast.new(self, type)
|
24
24
|
end
|
25
25
|
|
26
|
+
def dig(*keys)
|
27
|
+
keys = keys[0] if keys.size == 1 && keys.first.is_a?(Array)
|
28
|
+
|
29
|
+
if keys.empty?
|
30
|
+
self
|
31
|
+
else
|
32
|
+
keys.inject(self) { |node, key| Arel::Attributes::Key.new(node, key) }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
26
36
|
end
|
27
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arel-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Bracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: arel
|