Class: Byebug::LocalInterface
Instance Attribute Summary collapse
Attributes inherited from Interface
#command_queue, #restart_file
Instance Method Summary
collapse
Methods inherited from Interface
#errmsg, #escape, #format
Constructor Details
Returns a new instance of LocalInterface.
7
8
9
10
|
# File 'lib/byebug/interfaces/local_interface.rb', line 7
def initialize
super
History.load
end
|
Instance Attribute Details
#history ⇒ Object
Returns the value of attribute history.
5
6
7
|
# File 'lib/byebug/interfaces/local_interface.rb', line 5
def history
@history
end
|
Instance Method Details
#close ⇒ Object
24
25
26
|
# File 'lib/byebug/interfaces/local_interface.rb', line 24
def close
History.save
end
|
#confirm(prompt) ⇒ Object
16
17
18
|
# File 'lib/byebug/interfaces/local_interface.rb', line 16
def confirm(prompt)
readline(prompt, false)
end
|
#print(*args) ⇒ Object
20
21
22
|
# File 'lib/byebug/interfaces/local_interface.rb', line 20
def print(*args)
STDOUT.printf(escape(format(*args)))
end
|
#read_command(prompt) ⇒ Object
12
13
14
|
# File 'lib/byebug/interfaces/local_interface.rb', line 12
def read_command(prompt)
readline(prompt, true)
end
|