Method: Consular::DSL#window

Defined in:
lib/consular/dsl.rb

#window(*args, &block) ⇒ Object

Run commands in the conext of a window.

Examples:

window 'my project', :size => [80, 30] do
  run 'ps aux'
end


98
99
100
101
102
103
104
# File 'lib/consular/dsl.rb', line 98

def window(*args, &block)
  key            = "window#{@_windows.keys.size}"
  options        = args.extract_options!
  options[:name] = args.first unless args.empty?
  context = (@_windows[key] = window_hash.merge(:options => options))
  run_context context, &block
end