class Rails::Generators::NamedBase

def self.check_class_collision(options={})


the presence of "AdminObserver".
If the generator is invoked with class name Admin, it will check for

check_class_collision :suffix => "Observer"

==== Examples

can supply a hash with a :prefix or :suffix to be tested.
Add a class collisions name to be checked on class initialization. You
def self.check_class_collision(options={})
  define_method :check_class_collision do
    name = if self.respond_to?(:controller_class_name) # for ScaffoldBase
      controller_class_name
    else
      class_name
    end
    class_collisions "#{options[:prefix]}#{name}#{options[:suffix]}"
  end
end