Module: MonkeyPatcher::ClassMethods
- Defined in:
- lib/monkey_patcher.rb
Instance Method Summary collapse
- #method_added(method_name) ⇒ Object
- #monkey_trace(desc, file_path = nil) ⇒ Object
- #patched_methods ⇒ Object
- #singleton_method_added(method_name) ⇒ Object
Instance Method Details
#method_added(method_name) ⇒ Object
29 30 31 32 33 |
# File 'lib/monkey_patcher.rb', line 29 def method_added(method_name) log_monkey_patch(method_name) # call super in case someone else is hooking into the method addition super end |
#monkey_trace(desc, file_path = nil) ⇒ Object
20 21 22 23 |
# File 'lib/monkey_patcher.rb', line 20 def monkey_trace(desc, file_path=nil) @desc = desc @current_monkey_patch_file = file_path end |
#patched_methods ⇒ Object
25 26 27 |
# File 'lib/monkey_patcher.rb', line 25 def patched_methods @patched_methods || [] end |
#singleton_method_added(method_name) ⇒ Object
35 36 37 38 39 |
# File 'lib/monkey_patcher.rb', line 35 def singleton_method_added(method_name) log_monkey_patch(method_name, true) # call super in case someone else is hooking into the method addition super end |