Sha256: cce03be20ba9296521786e210d7b2d9e942782ff132ca9a7b5fe357e9789f3d2

Contents?: true

Size: 548 Bytes

Versions: 136

Compression:

Stored size: 548 Bytes

Contents

#!/usr/local/bin/ruby -w

# overwrite.rb
# 
#  Created by Jeremy Hinegardner on 2007-01-24
#  Copyright 2007 Jeremy Hinegardner.  All rights reserved 

require 'rubygems'
require 'highline/import'

prompt = "here is your password:"
ask(
  "#{prompt} <%= color('mypassword', RED, BOLD) %> (Press Any Key to blank) "
) do |q|
    q.overwrite = true
    q.echo      = false  # overwrite works best when echo is false.
    q.character = true   # if this is set to :getc then overwrite does not work
end
say("<%= color('Look! blanked out!', GREEN) %>")

Version data entries

136 entries across 132 versions & 15 rubygems

Version Path
radiant-0.7.1 vendor/highline/examples/overwrite.rb
rudy-0.6.2 vendor/highline-1.5.1/examples/overwrite.rb
rudy-0.6.1 vendor/highline-1.5.1/examples/overwrite.rb
rudy-0.6.0 vendor/highline-1.5.1/examples/overwrite.rb
rudy-0.6.3 vendor/highline-1.5.1/examples/overwrite.rb
rudy-0.6.5 vendor/highline-1.5.1/examples/overwrite.rb
rudy-0.6.4 vendor/highline-1.5.1/examples/overwrite.rb
rudy-0.6.6 vendor/highline-1.5.1/examples/overwrite.rb
rudy-0.6.7 vendor/highline-1.5.1/examples/overwrite.rb
rudy-0.6.8 vendor/highline-1.5.1/examples/overwrite.rb
rudy-0.7.0 vendor/highline-1.5.1/examples/overwrite.rb
rudy-0.7.3 vendor/highline-1.5.1/examples/overwrite.rb
rudy-0.7.1 vendor/highline-1.5.1/examples/overwrite.rb
rye-0.6.2 vendor/highline-1.5.1/examples/overwrite.rb
rye-0.6.3 vendor/highline-1.5.1/examples/overwrite.rb
rye-0.6.4 vendor/highline-1.5.1/examples/overwrite.rb