Sha256: 925ad86d4e617907e9c54ef6261c642cb1895f6629f9038ca790cb808f56d34e

Contents?: true

Size: 687 Bytes

Versions: 74

Compression:

Stored size: 687 Bytes

Contents

# frozen_string_literal: true

require "rails/generators"

module Rails
  module Command
    class GenerateCommand < Base # :nodoc:
      no_commands do
        def help
          require_application_and_environment!
          load_generators

          Rails::Generators.help self.class.command_name
        end
      end

      def perform(*)
        generator = args.shift
        return help unless generator

        require_application_and_environment!
        load_generators

        ARGV.replace(args) # set up ARGV for third-party libraries

        Rails::Generators.invoke generator, args, behavior: :invoke, destination_root: Rails::Command.root
      end
    end
  end
end

Version data entries

74 entries across 70 versions & 6 rubygems

Version Path
railties-7.0.8.6 lib/rails/commands/generate/generate_command.rb
railties-6.1.7.10 lib/rails/commands/generate/generate_command.rb
railties-6.1.7.9 lib/rails/commands/generate/generate_command.rb
railties-7.0.8.5 lib/rails/commands/generate/generate_command.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/railties-7.0.8.4/lib/rails/commands/generate/generate_command.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/railties-7.0.5.1/lib/rails/commands/generate/generate_command.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/railties-7.0.5.1/lib/rails/commands/generate/generate_command.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/railties-7.0.5.1/lib/rails/commands/generate/generate_command.rb
railties-7.0.8.4 lib/rails/commands/generate/generate_command.rb
railties-6.1.7.8 lib/rails/commands/generate/generate_command.rb
railties-7.0.8.1 lib/rails/commands/generate/generate_command.rb
railties-6.1.7.7 lib/rails/commands/generate/generate_command.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/railties-7.0.3.1/lib/rails/commands/generate/generate_command.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/railties-7.0.2.3/lib/rails/commands/generate/generate_command.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/commands/generate/generate_command.rb
railties-7.0.8 lib/rails/commands/generate/generate_command.rb
railties-7.0.7.2 lib/rails/commands/generate/generate_command.rb
railties-6.1.7.6 lib/rails/commands/generate/generate_command.rb
railties-7.0.7.1 lib/rails/commands/generate/generate_command.rb
railties-6.1.7.5 lib/rails/commands/generate/generate_command.rb