Sha256: e4b2a3b9ad32dea674c85a9a11b0288f8b868239b0e3a5f58568833225939d6c

Contents?: true

Size: 608 Bytes

Versions: 19

Compression:

Stored size: 608 Bytes

Contents

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.shift

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
railties-5.1.7 lib/rails/commands/generate/generate_command.rb
railties-5.1.7.rc1 lib/rails/commands/generate/generate_command.rb
railties-5.1.6.2 lib/rails/commands/generate/generate_command.rb
railties-5.1.6.1 lib/rails/commands/generate/generate_command.rb
railties-5.1.6 lib/rails/commands/generate/generate_command.rb
railties-5.1.5 lib/rails/commands/generate/generate_command.rb
railties-5.1.5.rc1 lib/rails/commands/generate/generate_command.rb
railties-5.1.4 lib/rails/commands/generate/generate_command.rb
railties-5.1.4.rc1 lib/rails/commands/generate/generate_command.rb
railties-5.1.3 lib/rails/commands/generate/generate_command.rb
railties-5.1.3.rc3 lib/rails/commands/generate/generate_command.rb
railties-5.1.3.rc2 lib/rails/commands/generate/generate_command.rb
railties-5.1.3.rc1 lib/rails/commands/generate/generate_command.rb
railties-5.1.2 lib/rails/commands/generate/generate_command.rb
railties-5.1.2.rc1 lib/rails/commands/generate/generate_command.rb
railties-5.1.1 lib/rails/commands/generate/generate_command.rb
railties-5.1.0 lib/rails/commands/generate/generate_command.rb
railties-5.1.0.rc2 lib/rails/commands/generate/generate_command.rb
railties-5.1.0.rc1 lib/rails/commands/generate/generate_command.rb