Class: Rubinius::Debugger::Command
- Inherits:
-
Object
- Object
- Rubinius::Debugger::Command
show all
- Includes:
- Display
- Defined in:
- lib/rubinius/debugger/commands.rb
Direct Known Subclasses
Backtrace, CommandsList, Condition, Continue, DeleteBreakpoint, Disassemble, EvalCode, Help, ListCode, Next, PrettyPrintEvalCode, Quit, SetBreakPoint, SetFrame, SetVariable, ShowInfo, ShowVariable
Defined Under Namespace
Classes: Backtrace, CommandsList, Condition, Continue, DeleteBreakpoint, Disassemble, EvalCode, Help, ListCode, Next, NextInstruction, PrettyPrintEvalCode, Quit, SetBreakPoint, SetFrame, SetTempBreakPoint, SetVariable, ShowInfo, ShowVariable, StepInto
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Display
#ask, #crit, #display, #error, #info, #section
Constructor Details
#initialize(debugger) ⇒ Command
Returns a new instance of Command.
46
47
48
|
# File 'lib/rubinius/debugger/commands.rb', line 46
def initialize(debugger)
@debugger = debugger
end
|
Class Method Details
.commands ⇒ Object
21
22
23
|
# File 'lib/rubinius/debugger/commands.rb', line 21
def self.commands
@commands
end
|
.descriptor ⇒ Object
25
26
27
|
# File 'lib/rubinius/debugger/commands.rb', line 25
def self.descriptor
@descriptor ||= CommandDescription.new(self)
end
|
.ext_help(str) ⇒ Object
38
39
40
|
# File 'lib/rubinius/debugger/commands.rb', line 38
def self.ext_help(str)
descriptor.ext_help = str
end
|
.help(str) ⇒ Object
34
35
36
|
# File 'lib/rubinius/debugger/commands.rb', line 34
def self.help(str)
descriptor.help = str
end
|
.match?(cmd) ⇒ Boolean
42
43
44
|
# File 'lib/rubinius/debugger/commands.rb', line 42
def self.match?(cmd)
descriptor.patterns.include?(cmd)
end
|
.pattern(*strs) ⇒ Object
29
30
31
32
|
# File 'lib/rubinius/debugger/commands.rb', line 29
def self.pattern(*strs)
Command.commands << self
descriptor.patterns = strs
end
|
Instance Method Details
#current_frame ⇒ Object
58
59
60
|
# File 'lib/rubinius/debugger/commands.rb', line 58
def current_frame
@debugger.current_frame
end
|
#current_method ⇒ Object
54
55
56
|
# File 'lib/rubinius/debugger/commands.rb', line 54
def current_method
@debugger.current_frame.method
end
|
#listen(step = false) ⇒ Object
66
67
68
|
# File 'lib/rubinius/debugger/commands.rb', line 66
def listen(step=false)
@debugger.listen(step)
end
|
#run_code(str) ⇒ Object
50
51
52
|
# File 'lib/rubinius/debugger/commands.rb', line 50
def run_code(str)
@debugger.current_frame.run(str)
end
|
#variables ⇒ Object
62
63
64
|
# File 'lib/rubinius/debugger/commands.rb', line 62
def variables
@debugger.variables
end
|