Class: Neovim::ConnectionChild
- Inherits:
-
Connection
- Object
- MPLight::Types
- Connection
- Neovim::ConnectionChild
- Defined in:
- lib/neovim/connection.rb
Constant Summary
Constants included from Logging
Logging::DEFAULT_LEVEL, Logging::LEVELS
Instance Attribute Summary
Attributes inherited from Connection
Class Method Summary collapse
Methods inherited from Connection
#additional_data, #error, #initialize, #start
Methods included from Logging
Constructor Details
This class inherits a constructor from Neovim::Connection
Class Method Details
.open_files(*argv) ⇒ Object
96 97 98 99 100 101 102 103 104 |
# File 'lib/neovim/connection.rb', line 96 def open_files *argv eb = "--embed" argv.unshift eb unless argv.include? eb argv.unshift path IO.popen argv, "r+" do |io| Process.detach io.pid yield (new io, io) end end |
.path ⇒ Object
106 107 108 |
# File 'lib/neovim/connection.rb', line 106 def path ENV[ "NVIM_EXECUTABLE"].notempty? || "nvim" end |
.version ⇒ Object
110 111 112 113 114 |
# File 'lib/neovim/connection.rb', line 110 def version IO.popen [ path, "--version"] do |io| io.gets[ /\ANVIM +v?(.+)/, 1] end end |