hashedrecord 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hashedrecord/filtered.rb +21 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e253cb99355f060de0bd06686fc640d6bfe2ac21187b0441cbe0bc51587fe2d1
|
4
|
+
data.tar.gz: a5b324ef04adfa5aec2e9b5636eb0e6cd5a790c4d0213656d7db79f7d16d52c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15aba5e34a5ebc384b89173ea0baea7027aa69b69124b8def4b1e596fefd34a997e6782acaa75ec287309b38064674b3427c9001c84cbc08e3e3f8ad5fcee03d
|
7
|
+
data.tar.gz: 48384009c5ee5761c59060061b81df17ac0adf8d5a096683c25f0dd40db2434270e235691a460c25c6efdb5d93a3be6d31b2468f0404d0707e3928983c29a9f8
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Hashedrecord
|
4
|
+
class Filtered
|
5
|
+
include Enumerable
|
6
|
+
include ::HashedRecord::Chainable
|
7
|
+
|
8
|
+
def initialize(parent, filter)
|
9
|
+
@parent = parent
|
10
|
+
@filter = filter
|
11
|
+
end
|
12
|
+
|
13
|
+
def call(child_filter = [])
|
14
|
+
parent.call([filter] + child_filter)
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
attr_reader :filter, :parent
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hashedrecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Serg Tyatin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -45,6 +45,7 @@ extensions: []
|
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
47
|
- lib/hashedrecord.rb
|
48
|
+
- lib/hashedrecord/filtered.rb
|
48
49
|
homepage: https://github.com/2rba/hashedrecord
|
49
50
|
licenses:
|
50
51
|
- MIT
|