duck_puncher 2.10.0 → 2.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -1
- data/lib/duck_puncher/ducks/object.rb +1 -0
- data/lib/duck_puncher/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 555d02e3e7e88d8d9c9a70d31bfa42a5dd802a45
|
4
|
+
data.tar.gz: ef2931ae013a2b8b5f9240662447e0a0c8b4b628
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70b379254d8e70ecc5d2bdbe74316ec26beb624ba2e170812c34ff494d448b208eb57b12c56c0a6a33a77baa6e0f6470e92f1bc081ea381c8e317cea43597ddd
|
7
|
+
data.tar.gz: 97ef20a8d06ade8f52fd75fb0e06aa2e1f673884f68ccfb63e6528a30eabda882bd4968dc68bfd7ac68bc828d46087e21d3afc9d944c092bfeb848a65b04d54c
|
data/README.md
CHANGED
@@ -18,7 +18,6 @@ String #pluralize => `'hour'.pluralize(2)` => "hours"
|
|
18
18
|
#underscore => `'DuckPuncher::JSONStorage'.underscore` => 'duck_puncher/json_storage'
|
19
19
|
Object #clone! => `Object.new.clone!` => a deep clone of the object (using Marshal.dump)
|
20
20
|
#punch => `'duck'.punch` => a copy of 'duck' with the mixed String punches
|
21
|
-
#track => `'duck'.punch.track` => downloads the [ObjectTracker](https://github.com/ridiculous/object_tracker) gem if it's not available and starts tracking this object
|
22
21
|
Method #to_instruct => `Benchmark.method(:measure).to_instruct` returns the Ruby VM instruction sequence for the method
|
23
22
|
#to_source => `Benchmark.method(:measure).to_source` returns the method definition as a string
|
24
23
|
```
|
@@ -135,6 +134,18 @@ Fetching: pry-0.10.3.gem (100%)
|
|
135
134
|
|
136
135
|
Perfect! Mostly ... although, it doesn't work well with bigger gems or those with native extensions ¯\\\_(ツ)_/¯
|
137
136
|
|
137
|
+
__Object#track__ builds upon `require!` to download the [ObjectTracker](https://github.com/ridiculous/object_tracker) gem,
|
138
|
+
if it's not available in the current load path, and starts tracking the current object!
|
139
|
+
|
140
|
+
```ruby
|
141
|
+
>> class Duck; def to_s() "here i am" end; end
|
142
|
+
>> DuckPuncher.punch!(:Object, only: :track)
|
143
|
+
>> Duck.track
|
144
|
+
WARN: Punching require! onto Object
|
145
|
+
* called "#inspect"
|
146
|
+
=> Duck
|
147
|
+
```
|
148
|
+
|
138
149
|
## Contributing
|
139
150
|
|
140
151
|
* Fork it
|
data/lib/duck_puncher/version.rb
CHANGED