summaryrefslogtreecommitdiff
path: root/lib/yaml.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yaml.rb')
-rw-r--r--lib/yaml.rb20
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/yaml.rb b/lib/yaml.rb
index 19df5efc53..93e869cd79 100644
--- a/lib/yaml.rb
+++ b/lib/yaml.rb
@@ -13,17 +13,31 @@ rescue LoadError
end
module Psych
- class EngineManager # :nodoc:
+ class EngineManager
+ # Returns the YAML engine in use.
+ #
+ # By default Psych is used but the old and unmaintained Syck may be chosen.
+ #
+ # See #yamler= for more information.
attr_reader :yamler
- def initialize
+ def initialize # :nodoc:
@yamler = 'psych'
end
- def syck?
+ def syck? # :nodoc:
false
end
+ # By default Psych is used but the old and unmaintained Syck may be chosen.
+ #
+ # After installing the 'syck' gem, you can set the YAML engine to syck:
+ #
+ # YAML::ENGINE.yamler = 'syck'
+ #
+ # To set the YAML engine back to psych:
+ #
+ # YAML::ENGINE.yamler = 'psych'
def yamler= engine
case engine
when 'syck' then warn "syck has been removed"