Flowdock
method

dump

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