Class: Debugger::Interface
- Inherits:
-
Object
- Object
- Debugger::Interface
- Defined in:
- lib/ruby-debug/interface.rb
Overview
:nodoc:
Direct Known Subclasses
LocalInterface, RemoteInterface, ScriptInterface, TestInterface
Instance Attribute Summary collapse
-
#have_readline ⇒ Object
writeonly
true if Readline is available.
Instance Method Summary collapse
-
#afmt(msg, newline = "\n") ⇒ Object
Format msg with gdb-style annotation header.
- #aprint(msg) ⇒ Object
-
#errmsg(*args) ⇒ Object
Common routine for reporting debugger error messages.
-
#initialize ⇒ Interface
constructor
A new instance of Interface.
- #print_debug(msg) ⇒ Object
Constructor Details
#initialize ⇒ Interface
Returns a new instance of Interface.
5 6 7 |
# File 'lib/ruby-debug/interface.rb', line 5 def initialize @have_readline = false end |
Instance Attribute Details
#have_readline=(value) ⇒ Object (writeonly)
true if Readline is available
3 4 5 |
# File 'lib/ruby-debug/interface.rb', line 3 def have_readline=(value) @have_readline = value end |
Instance Method Details
#afmt(msg, newline = "\n") ⇒ Object
Format msg with gdb-style annotation header
23 24 25 |
# File 'lib/ruby-debug/interface.rb', line 23 def afmt(msg, newline="\n") "\032\032#{msg}#{newline}" end |
#aprint(msg) ⇒ Object
27 28 29 |
# File 'lib/ruby-debug/interface.rb', line 27 def aprint(msg) print afmt(msg) end |
#errmsg(*args) ⇒ Object
Common routine for reporting debugger error messages. Derived classed may want to override this to capture output.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ruby-debug/interface.rb', line 11 def errmsg(*args) if Debugger.annotate.to_i > 2 aprint 'error-begin' print(*args) aprint '' else print '*** ' print(*args) end end |
#print_debug(msg) ⇒ Object
31 32 33 |
# File 'lib/ruby-debug/interface.rb', line 31 def print_debug(msg) print(msg) end |