Class: Pry::Byebug::Breakpoints::MethodBreakpoint

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/pry/byebug/breakpoints.rb

Overview

Breakpoint in a Class#method location

Instance Method Summary collapse

Constructor Details

#initialize(byebug_bp, method) ⇒ MethodBreakpoint

Returns a new instance of MethodBreakpoint.



30
31
32
33
# File 'lib/pry/byebug/breakpoints.rb', line 30

def initialize(byebug_bp, method)
  __setobj__ byebug_bp
  @method = method
end

Instance Method Details

#source_codeObject



35
36
37
# File 'lib/pry/byebug/breakpoints.rb', line 35

def source_code
  Pry::Code.from_method(Pry::Method.from_str(@method))
end

#to_sObject



39
40
41
# File 'lib/pry/byebug/breakpoints.rb', line 39

def to_s
  @method
end