class Percheron::Commands::Purge
Public Instance Methods
execute()
click to toggle source
Calls superclass method
Percheron::Commands::Abstract#execute
# File lib/percheron/commands/purge.rb, line 9 def execute super runit { stack.purge!(unit_names: unit_names, force: force?) if yes? || confirm? } end
Private Instance Methods
confirm?()
click to toggle source
# File lib/percheron/commands/purge.rb, line 16 def confirm? ask('Are you sure you want to purge? (y|n) ') do |q| q.validate = /y(es)?|n(o)?/i end.match(/y(es)?/i) end