Class: Muwu::ProjectResetCompiled

Inherits:
Object
  • Object
show all
Includes:
Muwu
Defined in:
lib/muwu/project_builder/project_reset_compiled.rb

Constant Summary

Constants included from Muwu

GEM_HOME_LIB, GEM_HOME_LIB_MUWU, VERSION

Instance Method Summary collapse

Methods included from Muwu

debug, read

Constructor Details

#initialize(project) ⇒ ProjectResetCompiled

Returns a new instance of ProjectResetCompiled.



11
12
13
# File 'lib/muwu/project_builder/project_reset_compiled.rb', line 11

def initialize(project)
  @project = project
end

Instance Method Details

#reset_compiledObject



19
20
21
22
23
24
25
26
27
# File 'lib/muwu/project_builder/project_reset_compiled.rb', line 19

def reset_compiled
  puts "- Resetting #{@project.path_compiled}"
  begin
    FileUtils.remove_entry_secure(@project.path_compiled)
  rescue Errno::ENOENT
  ensure
    FileUtils.mkdir(@project.path_compiled)
  end
end