Class: CleanUp::Rules::CopyFile
- Inherits:
-
Base
- Object
- Base
- CleanUp::Rules::CopyFile
show all
- Defined in:
- lib/clean_up/rules/copy_file.rb
Instance Attribute Summary
Attributes inherited from Base
#options
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#build_conditions(options) ⇒ Object
6
7
8
|
# File 'lib/clean_up/rules/copy_file.rb', line 6
def build_conditions(options)
Conditions.build_for_file(options)
end
|
#call(entry, target) ⇒ Object
10
11
12
13
14
|
# File 'lib/clean_up/rules/copy_file.rb', line 10
def call(entry, target)
if match_conditions?(entry)
FileUtils.cp(entry, full_target_folder(target), verbose: true)
end
end
|