Method: Pry::Byebug::Breakpoints#add_method

Defined in:
lib/pry/byebug/breakpoints.rb

#add_method(method, expression = nil) ⇒ Object

Adds a method breakpoint.



51
52
53
54
55
56
57
58
# File 'lib/pry/byebug/breakpoints.rb', line 51

def add_method(method, expression = nil)
  validate_expression expression
  owner, name = method.split(/[\.#]/)
  byebug_bp = ::Byebug::Breakpoint.add(owner, name.to_sym, expression)
  bp = MethodBreakpoint.new byebug_bp, method
  breakpoints << bp
  bp
end