Class: Rails::Command::RakeCommand

Inherits:
Base show all
Extended by:
Actions
Defined in:
railties/lib/rails/commands/rake/rake_command.rb

Overview

:nodoc:

Class Method Summary collapse

Methods included from Actions

load_generators, load_tasks, require_application!, require_application_and_environment!, require_environment!, set_application_directory!

Methods inherited from Base

banner, base_name, command_name, default_command_root, desc, engine?, executable, exit_on_failure?, #help, hide_command!, inherited, namespace, usage_path

Class Method Details

.perform(task, args, config) ⇒ Object


15
16
17
18
19
20
21
22
23
24
25
# File 'railties/lib/rails/commands/rake/rake_command.rb', line 15

def perform(task, args, config)
  require_rake

  ARGV.replace([task, *args]) # set up ARGV for Rake

  Rake.application.standard_exception_handling do
    Rake.application.init("rails")
    Rake.application.load_rakefile
    Rake.application.top_level
  end
end

.printing_commandsObject


11
12
13
# File 'railties/lib/rails/commands/rake/rake_command.rb', line 11

def printing_commands
  formatted_rake_tasks.map(&:first)
end