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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cabef00090223f45e2914553387ecb3e2209d989e5600290cc6143dcb12782f
4
- data.tar.gz: 5501a68962a4349b0fa918eae099207d5ceb40369dc91de67aaba1f5d31f0df0
3
+ metadata.gz: 7a245eaf3ad3b8fdd173ae4d9975bdec60af8c3dbe8df004e84dbe823df2f464
4
+ data.tar.gz: 6e5459f17a011eccc97ef9bd610981efe3f032f54e355e7261459a07e1514983
5
5
  SHA512:
6
- metadata.gz: e378a3e420892fe16a45baafb6360dafe4a6c89b08d4858115b8c5aa24886fb25193e0184f52acaf02cc42cb7594127a2ba62b85966fc23c6ed5d5eb21766789
7
- data.tar.gz: b4a28b101878884b5741154c223004f5a6cddb85c13c98941aeb895fd804187a68a57846075ed0684531e24f5bb50e8ba708c1af3972e8d68d51d2c21617c0e9
6
+ metadata.gz: d06bc70579c81a8d27cec3ad21ccf7f352be94b6f66438eb1ca111e84b059a85d7a0c46937d875ef990035398f5ee0bdcbee3a189632fabfb58fc2305fd4ca3e
7
+ data.tar.gz: 02b01433c49964c183391234109b2fc3dff8d021856001f70f646d997c6257a1237e54cced9f7416e2b1e0447996fefa59fa3701bfcfa6c803e768eb95b6bdf1
@@ -1,3 +1,3 @@
1
1
  module BindingOfCallers
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -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 < frame_count
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.0
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: 2021-02-16 00:00:00.000000000 Z
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.2.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