Class: Debugger::Xml::Vim::Notification

Inherits:
Object
  • Object
show all
Defined in:
lib/debugger/xml/vim/notification.rb

Instance Method Summary collapse

Constructor Details

#initialize(command, options) ⇒ Notification

Returns a new instance of Notification.



6
7
8
9
10
11
12
# File 'lib/debugger/xml/vim/notification.rb', line 6

def initialize(command, options)
  @command = command
  @executable = options.vim_executable
  @servername = options.vim_servername
  @debug_mode = options.debug_mode
  @logger_file = options.logger_file
end

Instance Method Details

#sendObject



14
15
16
17
18
19
20
21
# File 'lib/debugger/xml/vim/notification.rb', line 14

def send
  command = ":call RubyDebugger.#{@command}()"
  starter = "<C-\\\\>"
  sys_cmd = "#{@executable} --servername #{@servername} -u NONE -U NONE " +
    "--remote-send \"#{starter}<C-N>#{command}<CR>\""
  log("Executing command: #{sys_cmd}")
  system(sys_cmd);
end