Class: Neovim::Request Private

Inherits:
Object
  • Object
show all
Defined in:
lib/neovim/request.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

A synchronous message from nvim.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method_name, args, msgpack_stream, request_id) ⇒ Request

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Request.



7
8
9
10
11
12
# File 'lib/neovim/request.rb', line 7

def initialize(method_name, args, msgpack_stream, request_id)
  @method_name = method_name.to_s
  @arguments = args
  @msgpack_stream = msgpack_stream
  @request_id = request_id
end

Instance Attribute Details

#argumentsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



5
6
7
# File 'lib/neovim/request.rb', line 5

def arguments
  @arguments
end

#method_nameObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



5
6
7
# File 'lib/neovim/request.rb', line 5

def method_name
  @method_name
end

Instance Method Details

#error(message) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



23
24
25
26
# File 'lib/neovim/request.rb', line 23

def error(message)
  @msgpack_stream.write([1, @request_id, message, nil])
  self
end

#respond(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
21
# File 'lib/neovim/request.rb', line 18

def respond(value)
  @msgpack_stream.write([1, @request_id, nil, value])
  self
end

#sync?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


14
15
16
# File 'lib/neovim/request.rb', line 14

def sync?
  true
end