def seq( type, &e )
      @seq_map = false
      val = Sequence.new
      e.call( val )
      self << "#{type} " if type.length.nonzero?

      #
      # Empty arrays
      #
      if val.length.zero?
        self << "[]"
      else
        # FIXME
        # if @buffer.length == 1 and options(:UseHeader) == false and type.length.zero?
        #     @headless = 1
        # end

        #
        # Emit the key and value
        #
        val.each { |v|
          self << "\n"
          indent!
          self << "- "
          @seq_map = true if v.class == Hash
          v.to_yaml( :Emitter => self )
        }
      end
    end
def seq( type, &e )
      @seq_map = false
      val = Sequence.new
      e.call( val )
      self << "#{type} " if type.length.nonzero?

      #
      # Empty arrays
      #
      if val.length.zero?
        self << "[]"
      else
        # FIXME
        # if @buffer.length == 1 and options(:UseHeader) == false and type.length.zero?
        #     @headless = 1
        # end

        #
        # Emit the key and value
        #
        val.each { |v|
          self << "\n"
          indent!
          self << "- "
          @seq_map = true if v.class == Hash
          v.to_yaml( :Emitter => self )
        }
      end
    end
Quick sequence