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 =
<<~DOCOPT Rotates a file (Like a backup). Usage: __PROGRAM__ [options] <path> __PROGRAM__ -h | --help Options: -h --help Show this screen. -L --space-limit=<space> Limit by <space> the space used by rotated files. DOCOPT
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 |