def section(name, opts = {})
      if @in_section
        # Nesting sections is bad, mmmkay?
        raise LineNotAllowed, "You can't nest sections in INI files."
      end

      # Add to a section if it already exists
      if @document.has_section?(name.to_s())
        @context = @document[name.to_s()]
      else
        @context = Lines::Section.new(name, line_options(opts))
        @document.lines << @context
      end

      if block_given?
        begin
          @in_section = true
          with_options(opts) { yield self }
          @context = @document
          blank()
        ensure
          @in_section = false
        end
      end
    end
def section(name, opts = {})
      if @in_section
        # Nesting sections is bad, mmmkay?
        raise LineNotAllowed, "You can't nest sections in INI files."
      end

      # Add to a section if it already exists
      if @document.has_section?(name.to_s())
        @context = @document[name.to_s()]
      else
        @context = Lines::Section.new(name, line_options(opts))
        @document.lines << @context
      end

      if block_given?
        begin
          @in_section = true
          with_options(opts) { yield self }
          @context = @document
          blank()
        ensure
          @in_section = false
        end
      end
    end
Creates a new section with the given name and adds it to the document.

 You can optionally supply a block (as detailed in the documentation for
 Generator#gen) in order to add options to the section.

 ==== Parameters
 name<String>:: A name for the given section.