Module: Kernel

Defined in:
lib/logsly/logging182/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)


122
123
124
125
126
127
# File 'lib/logsly/logging182/utils.rb', line 122

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