Class: Bricolage::FileTask::Remove

Inherits:
Action
  • Object
show all
Defined in:
lib/bricolage/filedatasource.rb

Instance Method Summary collapse

Constructor Details

#initialize(src) ⇒ Remove

Returns a new instance of Remove.



23
24
25
# File 'lib/bricolage/filedatasource.rb', line 23

def initialize(src)
  @src = src
end

Instance Method Details

#runObject



35
36
37
38
# File 'lib/bricolage/filedatasource.rb', line 35

def run
  FileUtils.rm_f source_files, verbose: true
  nil
end

#sourceObject



31
32
33
# File 'lib/bricolage/filedatasource.rb', line 31

def source
  "rm -f #{@src}"
end

#source_filesObject



27
28
29
# File 'lib/bricolage/filedatasource.rb', line 27

def source_files
  Dir.glob(@src)
end