class IniParse::Generator
def section(name, opts = {})
name
==== Parameters
Generator#gen) in order to add options to the section.
You can optionally supply a block (as detailed in the documentation for
Creates a new section with the given name and adds it to the document.
def section(name, opts = {}) if @in_section # Nesting sections is bad, mmmkay? raise LineNotAllowed, "You can't nest sections in INI files." end @context = Lines::Section.new(name, line_options(opts)) @document.lines << @context if block_given? begin @in_section = true with_options(opts) { yield self } @context = @document blank() ensure @in_section = false end end end