In Files

  • yaml.rb

Parent

Methods

Class/Module Index [+]

Quicksearch

Psych::EngineManager

Attributes

yamler[R]

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.

Public Instance Methods

yamler=(engine) click to toggle source

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'
 
               # File yaml.rb, line 41
def yamler= engine
  case engine
  when 'syck' then warn "syck has been removed"
  when 'psych' then @yamler = 'psych'
  else
    raise(ArgumentError, "bad engine")
  end

  engine
end
            

Commenting is here to help enhance the documentation. For example, sample code, or clarification of the documentation.

If you are posting code samples in your comments, please wrap them in "<pre><code class="ruby" > ... </code></pre>" markup in order to get syntax highlighting.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file a bug report so that it can be corrected for the next release. Thank you.

blog comments powered by Disqus