Class: DeadCodeDetector::InstanceMethodWrapper
Instance Attribute Summary
#klass
Class Method Summary
collapse
Instance Method Summary
collapse
#clear_cache, #initialize, #number_of_tracked_methods, #refresh_cache, track_method, #wrap_methods!
Class Method Details
.record_key(class_name) ⇒ Object
14
15
16
|
# File 'lib/dead_code_detector/instance_method_wrapper.rb', line 14
def record_key(class_name)
"dead_code_detector/record_keeper/#{class_name}/instance_methods"
end
|
.unwrap_method(klass, original_method) ⇒ Object
5
6
7
8
9
10
11
12
|
# File 'lib/dead_code_detector/instance_method_wrapper.rb', line 5
def unwrap_method(klass, original_method)
if original_method.owner == klass
klass.send(:define_method, original_method.name, original_method)
else
klass.send(:remove_method, original_method.name)
end
track_method(klass, original_method.name)
end
|
Instance Method Details
#get_method(method_name) ⇒ Object
19
20
21
|
# File 'lib/dead_code_detector/instance_method_wrapper.rb', line 19
def get_method(method_name)
klass.instance_method(method_name)
end
|