Module: Tlux::Splitable

Included in:
Pane, Window
Defined in:
lib/tlux/splitable.rb

Instance Method Summary collapse

Instance Method Details

#panesObject



9
10
11
# File 'lib/tlux/splitable.rb', line 9

def panes
  @panes ||= []
end

#split(orientation, opts = {}, &block) ⇒ Object



3
4
5
6
7
# File 'lib/tlux/splitable.rb', line 3

def split(orientation, opts = {}, &block)
  pane = Tlux::Pane.new(orientation, opts)
  panes << pane
  pane.instance_eval(&block) if block_given?
end