Flowdock
method

dump

Importance_1
Ruby latest stable (v1_9_3_392) - 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.

These similar methods exist in v1_9_3_392:

dump( obj, io = nil ) public

Converts obj to YAML and writes the YAML result to io.

File.open( 'animals.yaml', 'w' ) do |out|
  YAML.dump( ['badger', 'elephant', 'tiger'], out )
end

If no io is provided, a string containing the dumped YAML is returned.

YAML.dump( :locked )
   #=> "--- :locked"
Show source
Register or log in to add new notes.