Class: Dustcart::Resource::Input::File
- Defined in:
- lib/dustcart/input/file.rb
Overview
input: file
Instance Attribute Summary
Attributes inherited from FileBase
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from FileBase
Methods inherited from Base
Methods inherited from Base
define_attribute, inherited, #initialize, #method_missing, #respond_to_missing?
Constructor Details
This class inherits a constructor from Dustcart::Resource::Input::FileBase
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Dustcart::Resource::Base
Instance Method Details
#precheck ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/dustcart/input/file.rb', line 8 def precheck super raise " target(\#{from}) is not a regular file\n EOS\nend\n".unindent unless Object::File.file?(from) |
#run ⇒ Object
16 17 18 19 20 21 |
# File 'lib/dustcart/input/file.rb', line 16 def run super target = "#{to_dir}/#{label}" FileUtils.cp(from, target) end |