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 14 |
# File 'lib/git-cleanup/helper.rb', line 3 def self.boolean(question, &block) Formatador.display_line "" Formatador.display("[bold][blue][QUESTION][/] #{question} (y/n)[/] ") answer = STDIN.gets.chomp if answer == 'y' yield elsif answer == 'n' return false else boolean(question, &block) end end |
.info(info) ⇒ Object
16 17 18 |
# File 'lib/git-cleanup/helper.rb', line 16 def self.info(info) Formatador.display_line "[bold][yellow][INFO][/] #{info}[/]" end |