Class: Neovim::API::Function Private

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

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Function

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 Function.



74
75
76
# File 'lib/neovim/api.rb', line 74

def initialize(attributes)
  @name = attributes.fetch("name")
end

Instance Attribute Details

#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.



72
73
74
# File 'lib/neovim/api.rb', line 72

def name
  @name
end

Instance Method Details

#call(session, *args) ⇒ 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.

Apply this function to a running RPC session.



83
84
85
# File 'lib/neovim/api.rb', line 83

def call(session, *args)
  session.request(name, *args)
end

#method_nameObject

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.



78
79
80
# File 'lib/neovim/api.rb', line 78

def method_name
  @name.sub(/^nvim_(win_|buf_|tabpage_)?/, "").to_sym
end