Class: Rails::Command::RakeCommand

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

Overview

:nodoc:

Class Method Summary collapse

Methods included from Actions

load_generators, load_tasks, require_application_and_environment!, set_application_directory!

Methods inherited from Base

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

Class Method Details

.perform(task) ⇒ Object



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

def perform(task, *)
  require_rake

  ARGV.unshift(task) # Prepend the task, so Rake knows how to run it.

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

.printing_commandsObject



9
10
11
# File 'lib/rails/commands/rake/rake_command.rb', line 9

def printing_commands
  formatted_rake_tasks.map(&:first)
end