class method
self.base_name
Ruby on Rails 8.0.4
Since v3.0.20Signature
self.base_name()
Sets the base_name taking into account the current class namespace.
Source
# File railties/lib/rails/generators/base.rb, line 334
def self.base_name # :doc:
@base_name ||= if base = name.to_s.split("::").first
base.underscore
end
end
Defined in railties/lib/rails/generators/base.rb line 334
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::Base