Class: Debugger::Processor
- Inherits:
-
Object
- Object
- Debugger::Processor
- Defined in:
- lib/ruby-debug/processor.rb
Overview
Should this be a mixin?
Direct Known Subclasses
Instance Attribute Summary collapse
-
#interface ⇒ Object
:nodoc.
Instance Method Summary collapse
-
#afmt(msg, newline = "\n") ⇒ Object
Format msg with gdb-style annotation header.
- #aprint(msg) ⇒ Object
-
#errmsg(*args) ⇒ Object
FIXME: use delegate?.
-
#print(*args) ⇒ Object
Callers of this routine should make sure to use comma to separate format argments rather than %.
Instance Attribute Details
#interface ⇒ Object
:nodoc
8 9 10 |
# File 'lib/ruby-debug/processor.rb', line 8 def interface @interface end |
Instance Method Details
#afmt(msg, newline = "\n") ⇒ Object
Format msg with gdb-style annotation header
11 12 13 |
# File 'lib/ruby-debug/processor.rb', line 11 def afmt(msg, newline="\n") "\032\032#{msg}#{newline}" end |
#aprint(msg) ⇒ Object
15 16 17 |
# File 'lib/ruby-debug/processor.rb', line 15 def aprint(msg) print afmt(msg) if Debugger.annotate.to_i > 2 end |
#errmsg(*args) ⇒ Object
FIXME: use delegate?
20 21 22 |
# File 'lib/ruby-debug/processor.rb', line 20 def errmsg(*args) @interface.errmsg(*args) end |
#print(*args) ⇒ Object
Callers of this routine should make sure to use comma to separate format argments rather than %. Otherwise it seems that if the string you want to print has format specifier, which could happen if you are trying to show say a source-code line with “puts” or “print” in it, this print routine will give an error saying it is looking for more arguments.
30 31 32 |
# File 'lib/ruby-debug/processor.rb', line 30 def print(*args) @interface.print(*args) end |