jinyu-debug-tools 0.0.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 +7 -0
- data/lib/utils/method_debugger.rb +22 -0
- metadata +44 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d33bd2baae4f344ea32b57b0c737cf183f93f66c
|
4
|
+
data.tar.gz: 22bac85733ff09db14d10055ab63e6577f9e46ab
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3453001598a2ddc744f1e00d6edd197ccbd3c65b3f511d4eb3fc2202d5040bb150be02cbf1689deeea19b87c557fe77dba5d5e544d1ca97211521ba14a63c772
|
7
|
+
data.tar.gz: e459945e9d1db7e0a1296e3bb34ba368660003e5df87dcd86a2f5965964db85d7a2547bbab4df8379ae8bbcede31a10ff890514a37915449975edeb24da70e43
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module JinyuDebugTools
|
2
|
+
module MethodDebugger
|
3
|
+
def self.included(sub_klass)
|
4
|
+
sub_klass.class_eval do
|
5
|
+
@method_table = {}
|
6
|
+
|
7
|
+
def self.method_added(method_name)
|
8
|
+
return if @method_table[method_name]
|
9
|
+
@method_table[method_name] = true
|
10
|
+
return if method_name.to_s.match(/^____/)
|
11
|
+
|
12
|
+
alias_method "__#{method_name}".to_sym, method_name
|
13
|
+
|
14
|
+
define_method(method_name) do |*method_args|
|
15
|
+
puts "jinyu.debug: #{caller[0]} calls #{method_name}, #{method_args}" if !method_name.to_sym.match(/^__/)
|
16
|
+
self.send("__#{method_name}".to_sym, *method_args)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jinyu-debug-tools
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yukai Jin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-03-04 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: a simple toolkit to debug ruby code, no any guarentee
|
14
|
+
email: fish1928@outlook.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/utils/method_debugger.rb
|
20
|
+
homepage: https://github.com/fish1928/JinyuDebugTools
|
21
|
+
licenses:
|
22
|
+
- MIT
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubyforge_project:
|
40
|
+
rubygems_version: 2.6.14
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: simple toolkit for debugging ruby code
|
44
|
+
test_files: []
|