Class: Bricolage::FileTask::Remove
- Inherits:
-
Action
- Object
- Action
- Bricolage::FileTask::Remove
- Defined in:
- lib/bricolage/filedatasource.rb
Instance Method Summary collapse
-
#initialize(src) ⇒ Remove
constructor
A new instance of Remove.
- #run ⇒ Object
- #source ⇒ Object
- #source_files ⇒ Object
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
#run ⇒ Object
35 36 37 38 |
# File 'lib/bricolage/filedatasource.rb', line 35 def run FileUtils.rm_f source_files, verbose: true nil end |
#source ⇒ Object
31 32 33 |
# File 'lib/bricolage/filedatasource.rb', line 31 def source "rm -f #{@src}" end |
#source_files ⇒ Object
27 28 29 |
# File 'lib/bricolage/filedatasource.rb', line 27 def source_files Dir.glob(@src) end |