Class: Rvim::Tab
- Inherits:
-
Object
- Object
- Rvim::Tab
- Defined in:
- lib/rvim/tab.rb
Instance Attribute Summary collapse
-
#current_window ⇒ Object
Returns the value of attribute current_window.
-
#split_orientation ⇒ Object
Returns the value of attribute split_orientation.
-
#vars ⇒ Object
Returns the value of attribute vars.
-
#windows ⇒ Object
Returns the value of attribute windows.
Instance Method Summary collapse
- #display_name ⇒ Object
-
#initialize(window) ⇒ Tab
constructor
A new instance of Tab.
Constructor Details
#initialize(window) ⇒ Tab
Returns a new instance of Tab.
8 9 10 11 12 13 |
# File 'lib/rvim/tab.rb', line 8 def initialize(window) @windows = [window] @current_window = window @split_orientation = nil @vars = {} end |
Instance Attribute Details
#current_window ⇒ Object
Returns the value of attribute current_window.
5 6 7 |
# File 'lib/rvim/tab.rb', line 5 def current_window @current_window end |
#split_orientation ⇒ Object
Returns the value of attribute split_orientation.
5 6 7 |
# File 'lib/rvim/tab.rb', line 5 def split_orientation @split_orientation end |
#vars ⇒ Object
Returns the value of attribute vars.
6 7 8 |
# File 'lib/rvim/tab.rb', line 6 def vars @vars end |
#windows ⇒ Object
Returns the value of attribute windows.
5 6 7 |
# File 'lib/rvim/tab.rb', line 5 def windows @windows end |
Instance Method Details
#display_name ⇒ Object
15 16 17 18 19 20 |
# File 'lib/rvim/tab.rb', line 15 def display_name buf = @current_window&.buffer return '[New]' unless buf File.basename(buf.display_name) end |