Class: Byebug::RemoteInterface
- Defined in:
- lib/byebug/interface.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#command_queue ⇒ Object
Returns the value of attribute command_queue.
-
#histfile ⇒ Object
Returns the value of attribute histfile.
-
#history_length ⇒ Object
Returns the value of attribute history_length.
-
#history_save ⇒ Object
Returns the value of attribute history_save.
-
#restart_file ⇒ Object
Returns the value of attribute restart_file.
Attributes inherited from Interface
Instance Method Summary collapse
- #close ⇒ Object
- #confirm(prompt) ⇒ Object
- #finalize ⇒ Object
-
#initialize(socket) ⇒ RemoteInterface
constructor
A new instance of RemoteInterface.
- #print(*args) ⇒ Object
- #read_command(prompt) ⇒ Object
- #readline_support? ⇒ Boolean
Methods inherited from Interface
Constructor Details
#initialize(socket) ⇒ RemoteInterface
Returns a new instance of RemoteInterface.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/byebug/interface.rb', line 133 def initialize(socket) @command_queue = [] @socket = socket @history_save = false @history_length = 256 @histfile = '' # Do we read the histfile? # open(@histfile, 'r') do |file| # file.each do |line| # line.chomp! # Readline::HISTORY << line # end # end if File.exist?(@histfile) @restart_file = nil end |
Instance Attribute Details
#command_queue ⇒ Object
Returns the value of attribute command_queue.
130 131 132 |
# File 'lib/byebug/interface.rb', line 130 def command_queue @command_queue end |
#histfile ⇒ Object
Returns the value of attribute histfile.
130 131 132 |
# File 'lib/byebug/interface.rb', line 130 def histfile @histfile end |
#history_length ⇒ Object
Returns the value of attribute history_length.
130 131 132 |
# File 'lib/byebug/interface.rb', line 130 def history_length @history_length end |
#history_save ⇒ Object
Returns the value of attribute history_save.
130 131 132 |
# File 'lib/byebug/interface.rb', line 130 def history_save @history_save end |
#restart_file ⇒ Object
Returns the value of attribute restart_file.
131 132 133 |
# File 'lib/byebug/interface.rb', line 131 def restart_file @restart_file end |
Instance Method Details
#close ⇒ Object
149 150 151 152 |
# File 'lib/byebug/interface.rb', line 149 def close @socket.close rescue Exception end |
#confirm(prompt) ⇒ Object
154 155 156 |
# File 'lib/byebug/interface.rb', line 154 def confirm(prompt) send_command "CONFIRM #{prompt}" end |
#finalize ⇒ Object
158 159 |
# File 'lib/byebug/interface.rb', line 158 def finalize end |
#print(*args) ⇒ Object
169 170 171 |
# File 'lib/byebug/interface.rb', line 169 def print(*args) @socket.printf(*args) end |
#read_command(prompt) ⇒ Object
161 162 163 |
# File 'lib/byebug/interface.rb', line 161 def read_command(prompt) send_command "PROMPT #{prompt}" end |
#readline_support? ⇒ Boolean
165 166 167 |
# File 'lib/byebug/interface.rb', line 165 def readline_support? false end |