Module: Cure::Helpers::ObjectHelpers

Included in:
Builder::Candidate, Transformation::Candidate, Transformation::Translation, Validator::Candidate
Defined in:
lib/cure/helpers/object_helpers.rb

Instance Method Summary collapse

Instance Method Details

#class_exists?(klass_name) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
# File 'lib/cure/helpers/object_helpers.rb', line 9

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