mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/yaml.rb: Document toplevel YAML and YAML::ENGINE to describe
Psych vs Syck engines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9802a3e7de
commit
8670d55368
2 changed files with 23 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Jun 30 09:30:14 2011 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* lib/yaml.rb: Document toplevel YAML and YAML::ENGINE to describe
|
||||||
|
Psych vs Syck engines.
|
||||||
|
|
||||||
Thu Jun 30 09:21:52 2011 Eric Hodel <drbrain@segment7.net>
|
Thu Jun 30 09:21:52 2011 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/cmath.rb: Hide handle_no_method_error from RDoc.
|
* lib/cmath.rb: Hide handle_no_method_error from RDoc.
|
||||||
|
|
18
lib/yaml.rb
18
lib/yaml.rb
|
@ -1,3 +1,18 @@
|
||||||
|
##
|
||||||
|
# The YAML module allows you to use one of the two YAML engines that ship with
|
||||||
|
# ruby. By default Psych is used but the old and unmaintained Syck may be
|
||||||
|
# chosen.
|
||||||
|
#
|
||||||
|
# See Psych or Syck for usage and documentation.
|
||||||
|
#
|
||||||
|
# To set the YAML engine to syck:
|
||||||
|
#
|
||||||
|
# YAML::ENGINE.yamler = 'syck'
|
||||||
|
#
|
||||||
|
# To set the YAML engine back to psych:
|
||||||
|
#
|
||||||
|
# YAML::ENGINE.yamler = 'psych'
|
||||||
|
|
||||||
module YAML
|
module YAML
|
||||||
class EngineManager # :nodoc:
|
class EngineManager # :nodoc:
|
||||||
attr_reader :yamler
|
attr_reader :yamler
|
||||||
|
@ -27,6 +42,9 @@ module YAML
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Allows changing the current YAML engine. See YAML for details.
|
||||||
|
|
||||||
ENGINE = YAML::EngineManager.new
|
ENGINE = YAML::EngineManager.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue