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.



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

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

Instance Method Details

#source_codeObject



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

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

#to_sObject



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

def to_s
  @method
end