Class: Byebug::LocalInterface

Inherits:
Interface show all
Defined in:
lib/byebug/interfaces/local_interface.rb

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

#initializeLocalInterface

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

#historyObject (readonly)

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

#closeObject



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


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