method

name

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Rails::Generators::PluginGenerator
name() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 285
      def name
        @name ||= begin
          # same as ActiveSupport::Inflector#underscore except not replacing '-'
          underscored = original_name.dup
          underscored.gsub!(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
          underscored.gsub!(/([a-z\d])([A-Z])/, '\1_\2')
          underscored.downcase!

          underscored
        end
      end
Register or log in to add new notes.