D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Psych
/
Filename :
load-c.ri
back
Copy
U:RDoc::AnyMethod[iI" load:ETI"Psych::load;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"ILoad +yaml+ in to a Ruby data structure. If multiple documents are ;TI"Lprovided, the object contained in the first document will be returned. ;TI"G+filename+ will be used in the exception message if any exception ;TI">is raised while parsing. If +yaml+ is empty, it returns ;TI"Dthe specified +fallback+ return value, which defaults to +nil+.;To:RDoc::Markup::BlankLine o; ; [I"FRaises a Psych::SyntaxError when a YAML syntax error is detected.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I".Psych.load("--- a") # => 'a' ;TI"5Psych.load("---\n - a\n - b") # => ['a', 'b'] ;TI" ;TI"begin ;TI"1 Psych.load("--- `", filename: "file.txt") ;TI"%rescue Psych::SyntaxError => ex ;TI"" ex.file # => 'file.txt' ;TI"Q ex.message # => "(file.txt): found character that cannot start any token" ;TI" end ;T:@format0o; ; [I"FWhen the optional +symbolize_names+ keyword argument is set to a ;TI"Mtrue value, returns symbols for keys in Hash objects (default: strings).;T@o;; [I"NPsych.load("---\n foo: bar") # => {"foo"=>"bar"} ;TI"MPsych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} ;T; 0o; ; [I"KRaises a TypeError when `yaml` parameter is NilClass. This method is ;TI"Psimilar to `safe_load` except that `Symbol` objects are allowed by default.;T: @fileI"ext/psych/lib/psych.rb;T:0@omit_headings_from_table_of_contents_below000[ I"�(yaml, permitted_classes: [Symbol], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false, strict_integer: false);T@0FI" Psych;TcRDoc::NormalModule00