Sha256: a27bdff8ced0d2a5fadea29d1bc5ca1bac70237fbb9b898a734af9ba8e2c3487

Contents?: true

Size: 473 Bytes

Versions: 4

Compression:

Stored size: 473 Bytes

Contents

class GitCleanup
  module Helper
    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
    
    def self.info(info)
      Formatador.display_line "[bold][yellow][INFO][/] #{info}[/]"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
git-cleanup-0.2.3 lib/git-cleanup/helper.rb
git-cleanup-0.2.2 lib/git-cleanup/helper.rb
git-cleanup-0.2.1 lib/git-cleanup/helper.rb
git-cleanup-0.2.0 lib/git-cleanup/helper.rb