binding_of_callers 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/binding_of_callers/version.rb +1 -1
- data/lib/binding_of_callers.rb +8 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a245eaf3ad3b8fdd173ae4d9975bdec60af8c3dbe8df004e84dbe823df2f464
|
4
|
+
data.tar.gz: 6e5459f17a011eccc97ef9bd610981efe3f032f54e355e7261459a07e1514983
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d06bc70579c81a8d27cec3ad21ccf7f352be94b6f66438eb1ca111e84b059a85d7a0c46937d875ef990035398f5ee0bdcbee3a189632fabfb58fc2305fd4ca3e
|
7
|
+
data.tar.gz: 02b01433c49964c183391234109b2fc3dff8d021856001f70f646d997c6257a1237e54cced9f7416e2b1e0447996fefa59fa3701bfcfa6c803e768eb95b6bdf1
|
data/lib/binding_of_callers.rb
CHANGED
@@ -4,28 +4,28 @@ require 'binding_of_caller'
|
|
4
4
|
|
5
5
|
class Binding
|
6
6
|
|
7
|
-
def of_callers
|
8
|
-
enhance do |bi|
|
7
|
+
def of_callers(fc = frame_count)
|
8
|
+
enhance(fc) do |bi|
|
9
9
|
BindingOfCallers::Revealed.new bi
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
def of_callers!
|
14
|
-
enhance do |bi|
|
13
|
+
def of_callers!(fc = frame_count)
|
14
|
+
enhance(fc) do |bi|
|
15
15
|
bi.extend BindingOfCallers::Reveal
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
19
|
private
|
20
20
|
|
21
|
-
def enhance &enhance
|
22
|
-
collected.map(&enhance)
|
21
|
+
def enhance(fc, &enhance)
|
22
|
+
collected(fc).map(&enhance)
|
23
23
|
end
|
24
24
|
|
25
|
-
def collected
|
25
|
+
def collected(fc)
|
26
26
|
n = 3
|
27
27
|
bis = []
|
28
|
-
while n <
|
28
|
+
while n < fc
|
29
29
|
bis << of_caller(n)
|
30
30
|
n = n.succ
|
31
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binding_of_callers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ken
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
|
-
rubygems_version: 3.
|
124
|
+
rubygems_version: 3.1.6
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: a wrapper of binding_of_caller, for easy use
|