load_stream(yaml, filename = nil)
Class Public methods
Load multiple documents given in yaml. Returns the parsed
documents as a list. If a block is given, each document will be converted
to ruby and passed to the block during parsing
Example:
Psych.load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar']
list = []
Psych.load_stream("--- foo\n...\n--- bar\n...") do |ruby|
list << ruby
end
list # => ['foo', 'bar']