Class: ThemeJuice::Commands::Delete

Inherits:
ThemeJuice::Command show all
Defined in:
lib/theme-juice/commands/delete.rb

Instance Attribute Summary

Attributes inherited from Task

#tasks

Instance Method Summary collapse

Methods inherited from ThemeJuice::Command

#execute, #unexecute

Methods inherited from Task

#execute, #runner, #unexecute

Constructor Details

#initialize(opts = {}) ⇒ Delete



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/theme-juice/commands/delete.rb', line 7

def initialize(opts = {})
  super

  init_project

  runner do |tasks|
    tasks << Tasks::DeleteConfirm.new
    tasks << Tasks::Database.new
    if @env.nginx
      tasks << Tasks::Nginx.new
    else
      tasks << Tasks::Apache.new
    end
    tasks << Tasks::VMLocation.new
    tasks << Tasks::SyncedFolder.new
    tasks << Tasks::DNS.new
    if @project.vm_restart
      tasks << Tasks::VMRestart.new
    else
      tasks << Tasks::VMProvision.new
    end
    tasks << Tasks::DeleteSuccess.new
  end
end