Module: GitCleanup::Helper
- Defined in:
- lib/git-cleanup/helper.rb
Class Method Summary collapse
Class Method Details
.boolean(question, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/git-cleanup/helper.rb', line 3 def self.boolean(question, &block) puts "#{question} (y/n)" answer = STDIN.gets.chomp if answer == 'y' yield elsif answer == 'n' return false else boolean(question, &block) end end |