method
flush
v1_9_2_180 -
Show latest stable
- Class:
WEBrick::HTTPAuth::Htdigest
flush(output=nil)public
No documentation available.
# File lib/webrick/httpauth/htdigest.rb, line 47
def flush(output=nil)
output ||= @path
tmp = Tempfile.new("htpasswd", File::dirname(output))
begin
each{|item| tmp.puts(item.join(":")) }
tmp.close
File::rename(tmp.path, output)
rescue
tmp.close(true)
end
end