Top Level Namespace

Defined Under Namespace

Modules: RegExRX2MD Classes: String

Instance Method Summary collapse

Instance Method Details

#class_exists?(class_name) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
# File 'lib/regexrx2md.rb', line 9

def class_exists?(class_name)
  klass = Module.const_get(class_name)
  klass.is_a?(Class)
rescue NameError
  false
end