D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Psych
/
Filename :
dump-c.ri
back
Copy
U:RDoc::AnyMethod[iI" dump:ETI"Psych::dump;TT:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"QDump Ruby object +o+ to a YAML string. Optional +options+ may be passed in ;TI"Pto control the output format. If an IO object is passed in, the YAML will ;TI"!be dumped to that IO object.;To:RDoc::Markup::BlankLine o; ; [I"%Currently supported options are:;T@o:RDoc::Markup::List: @type: LABEL:@items[ o:RDoc::Markup::ListItem:@label[I"<tt>:indentation</tt>;T; [o; ; [I"0Number of space characters used to indent. ;TI"8Acceptable value should be in <tt>0..9</tt> range, ;TI"!otherwise option is ignored.;T@o; ; [I"Default: <tt>2</tt>.;To;;[I"<tt>:line_width</tt>;T; [o; ; [I"$Max character to wrap line at. ;TI".For unlimited line width use <tt>-1</tt>.;T@o; ; [I"0Default: <tt>0</tt> (meaning "wrap at 81").;To;;[I"<tt>:canonical</tt>;T; [o; ; [I"4Write "canonical" YAML form (very verbose, yet ;TI"strictly formal).;T@o; ; [I"Default: <tt>false</tt>.;To;;[I"<tt>:header</tt>;T; [ o; ; [I"AWrite <tt>%YAML [version]</tt> at the beginning of document.;T@o; ; [I"Default: <tt>false</tt>.;T@o;;[I"<tt>:stringify_names</tt>;T; [ o; ; [I"0Dump symbol keys in Hash objects as string.;T@o; ; [I"Default: <tt>false</tt>.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"-# Dump an array, get back a YAML string ;TI"4Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" ;TI" ;TI"%# Dump an array to an IO object ;TI"MPsych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890> ;TI" ;TI"*# Dump an array with indentation set ;TI"HPsych.dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" ;TI" ;TI"3# Dump an array to an IO with indentation set ;TI"<Psych.dump(['a', ['b']], StringIO.new, indentation: 3) ;TI" ;TI",# Dump hash with symbol keys as string ;TI"CPsych.dump({a: "b"}, stringify_names: true) # => "---\na: b\n";T:@format0: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below0I"�Psych.dump(o) -> string of yaml Psych.dump(o, options) -> string of yaml Psych.dump(o, io) -> io object passed in Psych.dump(o, io, options) -> io object passed in ;T0[ I" (o, io = nil, options = {});T@_FI" Psych;TcRDoc::NormalModule00