Module: Kernel

Defined in:
lib/logging/utils.rb

Overview


Instance Method Summary collapse

Instance Method Details

#require?(string) ⇒ Boolean

call-seq:

require?( string )

Attempt to the load the library named string using the standard Kernel#require method. Returns true if the library was successfully loaded. Returns false if the library could not be loaded. This method will never raise an exception.

Returns:

  • (Boolean)


119
120
121
122
123
124
# File 'lib/logging/utils.rb', line 119

def require?( string )
  require string
  return true
rescue LoadError
  return false
end