class Object
Public Instance Methods
webgen_require(library, gem = library)
click to toggle source
Require the given library but handle a possible loading error more gracefully.
The parameter gem (which defaults to library)
should be set to the Rubygem that provides the library or to
nil if no such Rubygem exists.
# File lib/webgen/core_ext.rb, line 8 def webgen_require(library, gem = library) require library rescue LoadError raise Webgen::LoadError.new(library, self.class.name, nil, gem) end