Class: PryByebug::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.



27
28
29
30
# File 'lib/pry-byebug/breakpoints.rb', line 27

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

Instance Method Details

#source_codeObject



32
33
34
# File 'lib/pry-byebug/breakpoints.rb', line 32

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

#to_sObject



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

def to_s
  @method
end