Class: Neovim::Session::API::Function Private
- Inherits:
-
Object
- Object
- Neovim::Session::API::Function
- Defined in:
- lib/neovim/session/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
- #async ⇒ Object readonly private
- #name ⇒ Object readonly private
Instance Method Summary collapse
-
#call(session, *args) ⇒ Object
private
Apply this function to a running RPC session.
-
#initialize(name, async) ⇒ Function
constructor
private
A new instance of Function.
Constructor Details
#initialize(name, async) ⇒ 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.
51 52 53 |
# File 'lib/neovim/session/api.rb', line 51 def initialize(name, async) @name, @async = name, async end |
Instance Attribute Details
#async ⇒ Object (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.
49 50 51 |
# File 'lib/neovim/session/api.rb', line 49 def async @async end |
#name ⇒ Object (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.
49 50 51 |
# File 'lib/neovim/session/api.rb', line 49 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. Sends either a request if async is false or a notification if async is true.
57 58 59 60 61 62 63 |
# File 'lib/neovim/session/api.rb', line 57 def call(session, *args) if async session.notify(name, *args) else session.request(name, *args) end end |