Sha256: ae2e3a710952ed223e065ac8fe93bb060b099942f16a2730a4efd02f8cee73b5

Contents?: true

Size: 589 Bytes

Versions: 4

Compression:

Stored size: 589 Bytes

Contents

#!/usr/bin/env ruby

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

require 'rubygems'
require 'highline/import'

puts "Using: #{$terminal.terminal.class}"
puts

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

4 entries across 4 versions & 1 rubygems

Version Path
highline-2.0.0.pre.develop.9 examples/overwrite.rb
highline-2.0.0.pre.develop.6 examples/overwrite.rb
highline-2.0.0.pre.develop.4 examples/overwrite.rb
highline-2.0.0.pre.develop.2 examples/overwrite.rb