Class: Neovim::Current
- Inherits:
-
Object
- Object
- Neovim::Current
- Defined in:
- lib/neovim/current.rb
Overview
Support for client.current
chaining.
Instance Method Summary collapse
- #buffer ⇒ Buffer
- #buffer=(buffer) ⇒ Buffer, Fixnum
-
#initialize(session) ⇒ Current
constructor
A new instance of Current.
- #line ⇒ String
- #line=(line) ⇒ String
- #tabpage ⇒ Tabpage
- #tabpage=(tabpage) ⇒ Tabpage, Fixnum
- #window ⇒ Window
- #window=(window) ⇒ Window, Fixnum
Constructor Details
#initialize(session) ⇒ Current
Returns a new instance of Current.
9 10 11 |
# File 'lib/neovim/current.rb', line 9 def initialize(session) @session = session end |
Instance Method Details
#buffer ⇒ Buffer
25 26 27 |
# File 'lib/neovim/current.rb', line 25 def buffer @session.request(:vim_get_current_buffer) end |
#buffer=(buffer) ⇒ Buffer, Fixnum
31 32 33 |
# File 'lib/neovim/current.rb', line 31 def buffer=(buffer) @session.request(:vim_set_current_buffer, buffer) end |
#line ⇒ String
14 15 16 |
# File 'lib/neovim/current.rb', line 14 def line @session.request(:vim_get_current_line) end |
#line=(line) ⇒ String
20 21 22 |
# File 'lib/neovim/current.rb', line 20 def line=(line) @session.request(:vim_set_current_line, line) end |
#tabpage ⇒ Tabpage
47 48 49 |
# File 'lib/neovim/current.rb', line 47 def tabpage @session.request(:vim_get_current_tabpage) end |
#tabpage=(tabpage) ⇒ Tabpage, Fixnum
53 54 55 |
# File 'lib/neovim/current.rb', line 53 def tabpage=(tabpage) @session.request(:vim_set_current_tabpage, tabpage) end |
#window ⇒ Window
36 37 38 |
# File 'lib/neovim/current.rb', line 36 def window @session.request(:vim_get_current_window) end |
#window=(window) ⇒ Window, Fixnum
42 43 44 |
# File 'lib/neovim/current.rb', line 42 def window=(window) @session.request(:vim_set_current_window, window) end |