array-tweaks 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -0
- data/lib/array-tweaks.rb +10 -0
- data/lib/array-tweaks/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8d6c730aa86b8450081ea2947346c24cf3ea826821d2493c4cc628b40b09d916
|
4
|
+
data.tar.gz: 0abfa9b5e444b6b1c4df6f662c932a510568b7e07a5f212aba012a1772dfb971
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7845d08a878ec957a74bb8c3a2d49addbaf4eafa9715b4f844f45eefeea59a411a7c6656fc62a6e47e69cdba54c6b7c5e8714787dd07f14990eaaef9cf3b4ea4
|
7
|
+
data.tar.gz: b028f3bcb9221fe98c52cea7ef34eeb3f87997ebea0cfa6a6a232b46031cb5766901796b4fd4147aa8d398044144a0095d4714456ab20ce213a2fdc087b91291
|
data/README.md
CHANGED
data/lib/array-tweaks.rb
CHANGED
@@ -15,6 +15,16 @@ module ArrayTweaks
|
|
15
15
|
size = self.size
|
16
16
|
each_with_index { |item, index| yield(item, index, size) }
|
17
17
|
end
|
18
|
+
|
19
|
+
def each_after(n)
|
20
|
+
each_with_index do |item, i|
|
21
|
+
yield(item) if i >= n
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def map_key(key)
|
26
|
+
map { |item| item[key] }
|
27
|
+
end
|
18
28
|
end
|
19
29
|
end
|
20
30
|
|
data/lib/array-tweaks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: array-tweaks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yaroslav Konoplov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.6
|
91
|
+
rubygems_version: 2.7.6
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: Responsibly extends Ruby's Array with simple and predictable utilities.
|