lib/consular/dsl.rb
def tab(*args, &block)
      tabs = @_context[:tabs]
      key  = "tab#{tabs.keys.size}"
      return (tabs[key] = { :commands => args }) unless block_given?

      context           = (tabs[key] = {:commands => []})
      options           = args.extract_options!
      options[:name]    = args.first unless args.empty?
      context[:options] = options

      run_context context, &block
      @_context = @_windows[@_windows.keys.last] # Jump back out into the context of the last window.
    end
def tab(*args, &block)
      tabs = @_context[:tabs]
      key  = "tab#{tabs.keys.size}"
      return (tabs[key] = { :commands => args }) unless block_given?

      context           = (tabs[key] = {:commands => []})
      options           = args.extract_options!
      options[:name]    = args.first unless args.empty?
      context[:options] = options

      run_context context, &block
      @_context = @_windows[@_windows.keys.last] # Jump back out into the context of the last window.
    end
Run commands in the context of a tab.

 @param [Array] args
   Accepts either:
     - an array of string commands
     - a hash containing options for the tab.
 @param [Proc] block

 @example
   tab 'first tab', :settings => 'Grass' do
     run 'ps aux'
   end

   tab 'ls', 'gitx'

 @api public