How do I check If a Class already exists in Ruby - Stack Overflow
if defined?(MyClassName) == 'constant' && MyClassName.class == Class
puts "its a class"
end
Time to sit down and reflect.
How do I check If a Class already exists in Ruby - Stack Overflow
if defined?(MyClassName) == 'constant' && MyClassName.class == Class
puts "its a class"
end
Time to sit down and reflect.