Class: ThemeJuice::Command
Direct Known Subclasses
ThemeJuice::Commands::Create, ThemeJuice::Commands::Delete, ThemeJuice::Commands::Deploy, ThemeJuice::Commands::Init, ThemeJuice::Commands::Update
Instance Attribute Summary
Attributes inherited from Task
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(opts = {}) ⇒ Command
constructor
A new instance of Command.
- #unexecute ⇒ Object
Methods inherited from Task
Constructor Details
#initialize(opts = {}) ⇒ Command
Returns a new instance of Command.
6 7 8 9 10 |
# File 'lib/theme-juice/command.rb', line 6 def initialize(opts = {}) super @list = Tasks::List.new end |
Instance Method Details
#execute ⇒ Object
12 13 14 |
# File 'lib/theme-juice/command.rb', line 12 def execute @tasks.each { |task| task.execute } end |
#unexecute ⇒ Object
16 17 18 |
# File 'lib/theme-juice/command.rb', line 16 def unexecute @tasks.each { |task| task.unexecute } end |