binding_of_callers 0.2.2 → 0.2.3

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: a6590a18ce85e8b2bd69972061c5a2c6f23b93344c686ca068200baf82a2fd66
4
- data.tar.gz: ff0006a64f76f70a4c40852ebe3850346f60812480b1770591401cb16bbc37f7
3
+ metadata.gz: 7ccb825b2e6aef0a18c6335e827cb8f59b1dd65b9c5c63e6b91f4eee74a9219c
4
+ data.tar.gz: 5cd06d2244151bda2da052a6a170f24366b01f75f298129523718bed1957cd6d
5
5
  SHA512:
6
- metadata.gz: 4049585d6346140bc97623da6adff7bfb8b6c37725788b7abd578cd6244a5e5d56a53de9b7a269aefdebfd2f3bbaec77b3294a3efcbbb33f4c30121b0bc2109c
7
- data.tar.gz: fa6bc3f4b2bdc389a73d122542b2ebe5b9541039cbea24bd89e0e2526a8b488b258f08e85968ec669ff3afe92d7c01e8fa17bb59f8575f7a9caa624148c2f2a5
6
+ metadata.gz: 48b7cd786832b8dfeeea6724f64482129907789f3c774e22c7824c15626804e74c107b6c262285b272c3a96f35db5c579dd8c9e9b24145b68d2ef7ea8aa03124
7
+ data.tar.gz: 4a44996cd79b7b488545cf6806a82f512c445b60a38b8628cfc555e68c774433d19ad4a1a509dcc3bde050c43111873e5a0072925449060c064a1f4013021979
data/README.md CHANGED
@@ -23,6 +23,9 @@ Or install it yourself as:
23
23
  ```ruby
24
24
  binding.of_callers # => an array of wrapped binding of callers
25
25
  binding.of_callers! # => an array of extended binding of callers
26
+
27
+ binding.partial_callers(4) # => get closest four frames
28
+ binding.partial_callers(-2) # => get frames excluding the bottom two
26
29
  ```
27
30
 
28
31
  ### Inspect and modify a binding
@@ -120,7 +120,7 @@ module BindingOfCallers
120
120
  end
121
121
 
122
122
  def binding_self
123
- _binding.eval "instance_eval('self')"
123
+ _binding.receiver
124
124
  end
125
125
 
126
126
  def all_lv
@@ -5,9 +5,10 @@ module BindingOfCallers
5
5
 
6
6
  include Reveal
7
7
 
8
+ attr_reader :_binding
9
+
8
10
  def initialize _binding
9
11
  @_binding = _binding
10
12
  end
11
-
12
13
  end
13
14
  end
@@ -1,3 +1,3 @@
1
1
  module BindingOfCallers
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: binding_of_callers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ken