webby.rb

Path: lib/webby.rb
Last Update: Mon Apr 06 11:25:49 -0600 2009

Equivalent to a header guard in C/C++ Used to prevent the spec helper from being loaded more than once

Required files

logging   loquacious   rubygems   date  

Methods

Public Instance methods

Try to laod the given library using the built-in require, but do not raise a LoadError if unsuccessful. Returns true if the library was successfully loaded; returns false otherwise.

If a gemname is given, then the "gem gemname" command will be called before the library is loaded.

[Source]

# File lib/webby.rb, line 142
def try_require( lib, gemname = nil )
  gem gemname unless gemname.nil?
  require lib
  true
rescue LoadError
  false
end

[Validate]