Class: ThemeJuice::Tasks::Template

Inherits:
ThemeJuice::Task show all
Defined in:
lib/theme-juice/tasks/template.rb

Instance Attribute Summary

Attributes inherited from ThemeJuice::Task

#tasks

Instance Method Summary collapse

Methods inherited from ThemeJuice::Task

#runner, #unexecute

Constructor Details

#initialize(opts = {}) ⇒ Template

Returns a new instance of Template.



7
8
9
# File 'lib/theme-juice/tasks/template.rb', line 7

def initialize(opts = {})
  super
end

Instance Method Details

#executeObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/theme-juice/tasks/template.rb', line 11

def execute
  return unless @project.template

  clone_template

  if @config.exist?
    render_template_config_erb
    install_template
  end
end