BasicObject
# File lib/pry_debug/method_breakpoint.rb, line 64 def actual_class # this method uses Module#=== to be BasicObject safe @actual_class ||= klass.split('::').inject(Object) do |mod, const_name| if (Module === mod) && mod.const_defined?(const_name) mod.const_get const_name else break end end (Module === @actual_class) ? @actual_class : nil end
# File lib/pry_debug/method_breakpoint.rb, line 83 def has_class_method?(klass, method) (klass.private_methods + klass.methods).any? do |m| m.to_s == method end end
# File lib/pry_debug/method_breakpoint.rb, line 77 def has_instance_method?(klass, method) (klass.private_instance_methods + klass.instance_methods).any? do |m| m.to_s == method end end
# File lib/pry_debug/method_breakpoint.rb, line 38 def is_at?(other_class, other_name, other_class_method, binding) at_method?(other_class, other_name, other_class_method) && super(binding) end
# File lib/pry_debug/method_breakpoint.rb, line 50 def method_name klass + separator + name end
# File lib/pry_debug/method_breakpoint.rb, line 54 def referred_method if klass = actual_class @referred_method ||= if class_method? && has_class_method?(klass, name) (class << klass; self; end).instance_method(name) elsif !class_method && has_instance_method?(klass, name) klass.instance_method(name) end end end
Generated with the Darkfish Rdoc Generator 2.