Module: Validator

Defined in:
lib/type_cartographer/archive/helper_lib.rb,
lib/type_cartographer/archive/image_user.rb,
lib/type_cartographer/archive/image_forum.rb,
lib/type_cartographer/archive/image_group.rb,
lib/type_cartographer/archive/image_project.rb

Defined Under Namespace

Classes: ImageForum, ImageGroup, ImageProject, ImageUser

Instance Method Summary collapse

Instance Method Details

#class_exists?(name) ⇒ Boolean

module HelperLib

Returns:

  • (Boolean)


3
4
5
6
7
8
9
10
11
# File 'lib/type_cartographer/archive/helper_lib.rb', line 3

def class_exists?(name)
	begin
 		if Object.const_get(name)
 			return true
 		end
		rescue NameError
 			return false
	end
end