Class: Debugger::Xml::Vim::Interface
- Inherits:
-
Ide::Interface
- Object
- Interface
- Ide::Interface
- Debugger::Xml::Vim::Interface
- Defined in:
- lib/debugger/xml/vim/interface.rb
Instance Attribute Summary
Attributes inherited from Ide::Interface
#command_queue, #histfile, #history_length, #history_save, #restart_file
Instance Method Summary collapse
-
#initialize(socket, options) ⇒ Interface
constructor
A new instance of Interface.
- #print(*args) ⇒ Object
- #send_response ⇒ Object
Methods inherited from Ide::Interface
#close, #confirm, #errmsg, #finalize, #non_blocking_gets, #print_debug, #read_command, #readline_support?
Constructor Details
#initialize(socket, options) ⇒ Interface
Returns a new instance of Interface.
7 8 9 10 11 |
# File 'lib/debugger/xml/vim/interface.rb', line 7 def initialize(socket, ) super(socket) @options = @output = [] end |
Instance Method Details
#print(*args) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/debugger/xml/vim/interface.rb', line 13 def print(*args) escaped_args = escape_input(args) value = escaped_args.first % escaped_args[1..-1] Xml.logger.puts("Going to print: #{value}") @output << sprintf(value) end |
#send_response ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/debugger/xml/vim/interface.rb', line 20 def send_response create_directory(@options.file) = @output.join(@options.separator) @output.clear unless .empty? File.open(@options.file, 'w') do |f| f.puts() end Notification.new("receive_command", @options).send end end |