Parent

Class/Module Index [+]

Quicksearch

Object

Public Instance Methods

actual_class() click to toggle source
# 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
has_class_method?(klass, method) click to toggle source
# 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
has_instance_method?(klass, method) click to toggle source
# 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
is_at?(other_class, other_name, other_class_method, binding) click to toggle source
# 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
method_name() click to toggle source
# File lib/pry_debug/method_breakpoint.rb, line 50
def method_name
  klass + separator + name
end
referred_method() click to toggle source
# 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
separator() click to toggle source
# File lib/pry_debug/method_breakpoint.rb, line 46
def separator
  class_method ? "." : "#"
end
to_s() click to toggle source
# File lib/pry_debug/method_breakpoint.rb, line 42
def to_s
  "breakpoint #{id} at #{method_name}#{super}"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.