class PaperHouse::BuildTask::CleanTask
Helper class for defining CLEAN and CLOBBER.
Public Class Methods
new(targets, target_type)
click to toggle source
Add targets
to target_type
(:CLEAN
or :CLOBBER
). @example CleanTask.new
%w(file1 file2), :CLEAN
# File lib/paper_house/build_task.rb, line 17 def initialize(targets, target_type) @targets = targets @file_list = Object.const_get(target_type) define_task end
Private Instance Methods
define_task()
click to toggle source
# File lib/paper_house/build_task.rb, line 25 def define_task @targets.each do |each| next if @file_list.include?(each) @file_list.include each end @file_list.existing! end