vendor/bundle/ruby/1.8/gems/Ruby-MemCache-0.0.1/utils.rb
# Test for the presence of the specified <tt>library</tt>, and output a
# message describing the test using <tt>nicename</tt>. If <tt>nicename</tt>
# is <tt>nil</tt>, the value in <tt>library</tt> is used to build a default.
Test for the presence of the specified library, and output a
message describing the test using nicename. If nicename
is nil, the value in library is used to build a default.
Test for the presence of the specified library and output a message describing the test using nicename . If nicename is nil the value in library is used to build a default .
def testForLibrary( library, nicename=nil, progress=false )
		nicename ||= library
		message( "Testing for the #{nicename} library..." ) if progress
		if $LOAD_PATH.detect {|dir|
				File.exists?(File.join(dir,"#{library}.rb")) ||
				File.exists?(File.join(dir,"#{library}.#{CONFIG['DLEXT']}"))
			}
			message( "found.\n" ) if progress
			return true
		else
			message( "not found.\n" ) if progress
			return false
		end
	end
def testForLibrary ( library , nicename = nil , progress = false ) nicename ||= library message ( "Testing for the #{nicename} library..." ) if progress if $LOAD_PATH . detect { | dir | File . exists? ( File . join ( dir , "#{library}.rb" ) ) || File . exists? ( File . join ( dir , "#{library}.#{CONFIG['DLEXT']}" ) ) } message ( "found.\n" ) if progress return true else message ( "not found.\n" ) if progress return false end end
Test for the presence of the specified <tt>library</tt>, and output a
message describing the test using <tt>nicename</tt>.
Test for the presence of the specified <tt > library< / tt > and output a message describing the test using <tt > nicename< / tt > .
library
nicename
progress