Flowdock
method

each_document

Importance_1
v1_8_7_72 - Show latest stable - 0 notes - Class: YAML
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.