Class: ThemeJuice::Tasks::DotEnv

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

Instance Attribute Summary

Attributes inherited from ThemeJuice::Task

#tasks

Instance Method Summary collapse

Methods inherited from ThemeJuice::Task

#runner

Constructor Details

#initialize(opts = {}) ⇒ DotEnv

Returns a new instance of DotEnv.



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

def initialize(opts = {})
  super
end

Instance Method Details

#executeObject



11
12
13
14
15
# File 'lib/theme-juice/tasks/dot_env.rb', line 11

def execute
  return if @project.no_env || @project.no_wp

  create_dot_env_file
end

#unexecuteObject



17
18
19
# File 'lib/theme-juice/tasks/dot_env.rb', line 17

def unexecute
  remove_dot_env_file
end