Class: PryByebug::Breakpoints::MethodBreakpoint

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

Instance Method Summary collapse

Constructor Details

#initialize(byebug_bp, method) ⇒ MethodBreakpoint

Returns a new instance of MethodBreakpoint.



21
22
23
24
# File 'lib/pry-byebug/breakpoints.rb', line 21

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

Instance Method Details

#source_codeObject



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

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

#to_sObject



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

def to_s
  @method
end