base_name()
Sets the base_name taking into account the current class namespace.
# File railties/lib/rails/generators/base.rb, line 282 def self.base_name @base_name ||= begin if base = name.to_s.split('::').first base.underscore end end end