class Neovim::ClientInfo

@api private

Constants

ATTRIBUTES
HOST_METHOD_SPEC

Public Class Methods

for_client() click to toggle source
# File lib/neovim/client_info.rb, line 21
def self.for_client
  new("ruby-client", :remote, {}, ATTRIBUTES)
end
for_host(host) click to toggle source
# File lib/neovim/client_info.rb, line 13
def self.for_host(host)
  name = host.plugins.map(&:script_host?) == [true] ?
    "ruby-script-host" :
    "ruby-rplugin-host"

  new(name, :host, HOST_METHOD_SPEC, ATTRIBUTES)
end
new(name, type, method_spec, attributes) click to toggle source
# File lib/neovim/client_info.rb, line 25
def initialize(name, type, method_spec, attributes)
  @name = name
  @type = type
  @method_spec = method_spec
  @attributes = attributes

  @version = ["major", "minor", "patch"]
    .zip(Neovim::VERSION.segments)
    .to_h
end

Public Instance Methods

to_args() click to toggle source
# File lib/neovim/client_info.rb, line 36
def to_args
  [
    @name,
    @version,
    @type,
    @method_spec,
    @attributes
  ]
end