class Diskman::Confirmer
Confirms whether the user wants to do something destructive.
Constants
- YES
Public Class Methods
check!()
click to toggle source
# File lib/diskman/confirmer.rb, line 6 def self.check! new.check! end
Public Instance Methods
check!()
click to toggle source
# File lib/diskman/confirmer.rb, line 10 def check! puts puts 'Are you sure? Type "%s" if so.' % YES puts print '> ' if $stdin.gets.chomp != YES raise Interrupt end end