1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/yaml.rb: Documentation for YAML module [Bug #8213]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
zzak 2013-04-27 14:26:20 +00:00
parent ab750920b9
commit 3e1fad843e
2 changed files with 28 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Sat Apr 27 23:25:00 2013 Zachary Scott <zachary@zacharyscott.net>
* lib/yaml.rb: Documentation for YAML module [Bug #8213]
Sat Apr 27 20:19:21 2013 Tanaka Akira <akr@fsij.org>
* thread_pthread.c (ruby_init_stack): Add STACK_GROW_DIR_DETECTION.

View file

@ -12,7 +12,7 @@ rescue LoadError
raise
end
module Psych
module Psych # :nodoc:
class EngineManager
# Returns the YAML engine in use.
#
@ -53,4 +53,27 @@ module Psych
ENGINE = EngineManager.new # :nodoc:
end
# YAML Ain't Markup Language
#
# This module provides a Ruby interface for data serialization in YAML format.
#
# The underlying implementation depends on an engine to handle the parsing and
# serialization for Ruby, by default this will be using the libyaml wrapper
# Psych.
#
# See Psych::EngineManager for details on switching the default YAML engine.
#
# Working with YAML can be very simple, for example:
#
# require 'yaml' # STEP ONE, REQUIRE YAML!
# # Parse a YAML string
# YAML.load("--- foo") #=> "foo"
#
# # Emit some YAML
# YAML.dump("foo") # => "--- foo\n...\n"
# { :a => 'b'}.to_yaml # => "---\n:a: b\n"
#
# For more advanced details on the implementation see Psych, and also check out
# yaml.org for spec details and other helpful information.
module YAML; end
YAML = Psych