Class: Automux::Core::Tmux::Window
- Extended by:
- Forwardable
- Includes:
- Support::HooksHelper, Support::OptionsHelper
- Defined in:
- lib/automux/core/tmux/window.rb
Defined Under Namespace
Classes: Data
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Instance Method Summary collapse
- #change_root_command ⇒ Object
- #get_binding ⇒ Object
- #has_panes? ⇒ Boolean
-
#initialize(session, window_data) ⇒ Window
constructor
A new instance of Window.
- #opted_in? ⇒ Boolean
- #set_option(option) ⇒ Object
- #setup ⇒ Object
-
#update_index ⇒ Object
:stopdoc:.
Methods included from Support::HooksHelper
Methods included from Support::CustomAccessors
Constructor Details
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
9 10 11 |
# File 'lib/automux/core/tmux/window.rb', line 9 def data @data end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
9 10 11 |
# File 'lib/automux/core/tmux/window.rb', line 9 def index @index end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
9 10 11 |
# File 'lib/automux/core/tmux/window.rb', line 9 def session @session end |
Instance Method Details
#change_root_command ⇒ Object
53 54 55 |
# File 'lib/automux/core/tmux/window.rb', line 53 def change_root_command %[cd #{ root }] end |
#get_binding ⇒ Object
69 70 71 |
# File 'lib/automux/core/tmux/window.rb', line 69 def get_binding binding end |
#has_panes? ⇒ Boolean
43 44 45 |
# File 'lib/automux/core/tmux/window.rb', line 43 def has_panes? !@panes.nil? end |
#opted_in? ⇒ Boolean
47 48 49 50 51 |
# File 'lib/automux/core/tmux/window.rb', line 47 def opted_in? return true unless is_optional? data.opt end |
#set_option(option) ⇒ Object
39 40 41 |
# File 'lib/automux/core/tmux/window.rb', line 39 def set_option(option) %[tmux set-window-option -t #{ session.name }:#{ index } #{ option.name } '#{ option.value }'] end |
#setup ⇒ Object
63 64 65 66 67 |
# File 'lib/automux/core/tmux/window.rb', line 63 def setup setup_panes setup_hooks end |
#update_index ⇒ Object
:stopdoc:
59 60 61 |
# File 'lib/automux/core/tmux/window.rb', line 59 def update_index @index ||= session.next_available_window_index end |