Class: Debugger::PryCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug/pry.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.help(cmd) ⇒ Object



26
27
28
29
30
# File 'lib/ruby-debug/pry.rb', line 26

def help(cmd)
  %{
    pry\tstarts an Pry session.
  }
end

.help_commandObject



22
23
24
# File 'lib/ruby-debug/pry.rb', line 22

def help_command
  'pry'
end

Instance Method Details

#executeObject



12
13
14
15
16
17
18
19
# File 'lib/ruby-debug/pry.rb', line 12

def execute
  unless @state.interface.kind_of?(LocalInterface)
    print "Command is available only in local mode.\n"
    throw :debug_error
  end
  
  get_binding.pry
end

#regexpObject



6
7
8
9
10
# File 'lib/ruby-debug/pry.rb', line 6

def regexp
  /^\s* pry
    (?:\s+(-d))?
    \s*$/x
end