Class: MagicShelf::FileMover
- Inherits:
-
Object
- Object
- MagicShelf::FileMover
- Defined in:
- lib/magicshelf/filemover.rb
Instance Attribute Summary collapse
-
#inputfile ⇒ Object
Returns the value of attribute inputfile.
-
#outputfile ⇒ Object
Returns the value of attribute outputfile.
Instance Method Summary collapse
Instance Attribute Details
#inputfile ⇒ Object
Returns the value of attribute inputfile.
9 10 11 |
# File 'lib/magicshelf/filemover.rb', line 9 def inputfile @inputfile end |
#outputfile ⇒ Object
Returns the value of attribute outputfile.
9 10 11 |
# File 'lib/magicshelf/filemover.rb', line 9 def outputfile @outputfile end |
Instance Method Details
#enter ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/magicshelf/filemover.rb', line 11 def enter() MagicShelf.logger.debug('enter FileMover') raise MagicShelf::FileMoverError.new("inputfile is not set") if @inputfile == nil raise MagicShelf::FileMoverError.new("outputfile is not set") if @outputfile == nil yield end |
#process ⇒ Object
19 20 21 |
# File 'lib/magicshelf/filemover.rb', line 19 def process() FileUtils.mv(@inputfile, @outputfile) end |