Method: IniFile#each_section
- Defined in:
- lib/inifile.rb
#each_section ⇒ Object
Public: Yield each section in turn to the given block.
block - The block that will be iterated by the each method. The block will
be passed the current section as a Hash.
Examples
inifile.each_section do |section|
puts section.inspect
end
Returns this IniFile.
248 249 250 251 252 |
# File 'lib/inifile.rb', line 248 def each_section return unless block_given? @ini.each_key {|section| yield section} self end |