Class: RemoveCommand
Overview
Remove files #################################
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
- #dry_run ⇒ Object
- #filename ⇒ Object
-
#initialize(*args) ⇒ RemoveCommand
constructor
A new instance of RemoveCommand.
- #priority ⇒ Object
- #real_run ⇒ Object
Methods inherited from Command
Constructor Details
#initialize(*args) ⇒ RemoveCommand
Returns a new instance of RemoveCommand.
130 131 132 |
# File 'lib/commands.rb', line 130 def initialize *args (@filename, @path)=args end |
Instance Method Details
#dry_run ⇒ Object
136 137 138 |
# File 'lib/commands.rb', line 136 def dry_run "rm #{filename}" end |
#filename ⇒ Object
134 |
# File 'lib/commands.rb', line 134 def filename ; transform @filename ; end |
#priority ⇒ Object
128 |
# File 'lib/commands.rb', line 128 def priority ; 3 ; end |
#real_run ⇒ Object
140 141 142 |
# File 'lib/commands.rb', line 140 def real_run FileUtils.rm filename end |