Class: Avm::Tools::Runner::Files::Rotate
- Inherits:
-
EacRubyUtils::Console::DocoptRunner
- Object
- EacRubyUtils::Console::DocoptRunner
- Avm::Tools::Runner::Files::Rotate
- Includes:
- EacRubyUtils::Console::Speaker
- Defined in:
- lib/avm/tools/runner/files/rotate.rb
Constant Summary collapse
- DOC =
"Rotates a file (Like a backup).\n\nUsage:\n __PROGRAM__ [options] <path>\n __PROGRAM__ -h | --help\n\nOptions:\n -h --help Show this screen.\n -L --space-limit=<space> Limit by <space> the space used by rotated files.\n"
Instance Method Summary collapse
Instance Method Details
#rotate ⇒ Object
31 32 33 34 35 36 |
# File 'lib/avm/tools/runner/files/rotate.rb', line 31 def rotate @rotate ||= ::Avm::Files::Rotate.new( .fetch('<path>'), space_limit: .fetch('--space-limit') ) end |
#run ⇒ Object
26 27 28 29 |
# File 'lib/avm/tools/runner/files/rotate.rb', line 26 def run = rotate.run fatal_error() if end |