rudash 2.11.0 → 2.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rudash/group_by.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e03793015e21b55c2270f9a8dc164f2fda34cd245ed6321f7eee371d9999c0be
|
4
|
+
data.tar.gz: 6de12ecd7cbe84c7a21be38b795ad4bac59cf2f3c54a3c820bba0bee7bb2053e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5cdec12078e9ba71a407ffc0ddaca44fe887966cf54b23b6574ec46e28afe2a0120d73b5ca4dfbf0aef9b2a666e5a5b363711a21fc963a38f9bce9a4b2de61d
|
7
|
+
data.tar.gz: c3116e82e35c91691b61bfde79c3611c398f996fde5ad6ef0fc0c33be1012d26f00c6d784a7ab6187b17f119f5fe5ff24f5c07af06c8465c60673e73a3fab3ed
|
data/lib/rudash/group_by.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module Rudash
|
2
2
|
module GroupBy
|
3
|
-
def group_by(collection,
|
3
|
+
def group_by(collection, *rest_args)
|
4
|
+
iteratee = self.head(rest_args) || self.method(:identity)
|
4
5
|
|
5
6
|
reducer = -> (acc, current) {
|
6
7
|
key = Rudash::DynamicArgsCount.call(iteratee, current)
|