Class: Neovim::Session
Direct Known Subclasses
Remote
Constant Summary
Constants included
from Logging
Logging::DEFAULT_LEVEL, Logging::LEVELS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Logging
put
Constructor Details
#initialize(conn) ⇒ Session
Returns a new instance of Session.
43
44
45
46
|
# File 'lib/neovim/session.rb', line 43
def initialize conn
@conn = conn
@comm = Messager.new @conn, self
end
|
Class Method Details
.open(conntype, *args, **kwargs) ⇒ Object
22
23
24
25
26
|
# File 'lib/neovim/session.rb', line 22
def open conntype, *args, **kwargs
conntype.open_files *args, **kwargs do |conn|
yield (new conn)
end
end
|
.start(*args) ⇒ Object
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/neovim/session.rb', line 30
def start *args
open_logfile do
log :info, "Starting", args: $*
open *args do |i|
yield i
end
ensure
log :info, "Leaving"
end
end
|
Instance Method Details
#execute_handler(name, args) ⇒ Object
48
49
50
|
# File 'lib/neovim/session.rb', line 48
def execute_handler name, args
raise "No handler found for #{name.inspect}."
end
|
#notify(method, *args) ⇒ Object
55
|
# File 'lib/neovim/session.rb', line 55
def notify method, *args ; @comm.notify method, *args ; end
|
#request(method, *args) ⇒ Object
54
|
# File 'lib/neovim/session.rb', line 54
def request method, *args ; @comm.request method, *args ; end
|
53
|
# File 'lib/neovim/session.rb', line 53
def run ; @comm.run ; end
|