Flowdock
method

each_document

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Class: YAML

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_1_378) is shown here.

each_document( io, &block ) public

Calls block with each consecutive document in the YAML stream contained in io.

File.open( 'many-docs.yaml' ) do |yf|
  YAML.each_document( yf ) do |ydoc|
    ## ydoc contains the single object
    ## from the YAML document
  end
end
Show source
Register or log in to add new notes.