Sha256: faf2575369350a4b99e6334965affbaed7fb1c19ce577312aaaf036f98009594
Contents?: true
Size: 589 Bytes
Versions: 1
Compression:
Stored size: 589 Bytes
Contents
require 'scrambled_jpeg/version' module ScrambledJpeg class << self def scramble filename, grain=5 ending, cache = (store = File.readlines filename).pop, [] (new_file = File.open Time.now.hash.to_s + '.jpg', "w").write store.shift grain.times { new_file.write store.shift } .times { cache << store.shift } .times { new_file.write store.shift } .times { new_file.write cache.shift } until store.empty? && cache.empty? new_file.write ending && new_file.close end def hardboil filename, times=1 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
scrambled_jpeg-0.1.6 | lib/scrambled_jpeg.rb |