Method: RDoc.load_yaml

Defined in:
lib/rdoc.rb

.load_yamlObject

Loads the best available YAML library.



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/rdoc.rb', line 105

def self.load_yaml
  begin
    gem 'psych'
  rescue NameError => e # --disable-gems
    raise unless e.name == :gem
  rescue Gem::LoadError
  end

  begin
    require 'psych'
  rescue ::LoadError
  ensure
    require 'yaml'
  end
end