Class: Expire::Commands::Purge
- Inherits:
-
Expire::Command
- Object
- Expire::Command
- Expire::Commands::Purge
- Defined in:
- lib/expire/commands/purge.rb
Overview
Purge expired backups
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #execute(input: $stdin, output: $stdout) ⇒ Object
-
#initialize(path, options) ⇒ Purge
constructor
A new instance of Purge.
Methods inherited from Expire::Command
#command, #cursor, #editor, #exec_exist?, #generator, #pager, #platform, #prompt, #screen, #which
Constructor Details
#initialize(path, options) ⇒ Purge
9 10 11 12 |
# File 'lib/expire/commands/purge.rb', line 9 def initialize(path, ) @path = path = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
14 15 16 |
# File 'lib/expire/commands/purge.rb', line 14 def end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
14 15 16 |
# File 'lib/expire/commands/purge.rb', line 14 def path @path end |
Instance Method Details
#execute(input: $stdin, output: $stdout) ⇒ Object
16 17 18 19 20 |
# File 'lib/expire/commands/purge.rb', line 16 def execute(input: $stdin, output: $stdout) Expire.purge(path, ) rescue => _e exit 1 end |