Class: RakeT::TasksController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rake_t/tasks_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



6
7
8
# File 'app/controllers/rake_t/tasks_controller.rb', line 6

def index
  @tasks = RakeT.all_tasks
end

#showObject



10
11
12
13
14
15
16
17
# File 'app/controllers/rake_t/tasks_controller.rb', line 10

def show
  tmp = $stdout
  @output = StringIO.new
  $stdout = @output
  Rake::Task[params[:name].to_s].execute
  @output.rewind
  $stdout = tmp
end