# File lib/guid.rb, line 60 60: def initialize 61: if !@@random_device 62: if File.exists? "/dev/urandom" 63: @@random_device = File.open "/dev/urandom", "r" 64: elsif File.exists? "/dev/random" 65: @@random_device = File.open "/dev/random", "r" 66: else 67: raise RuntimeError, "Can't find random device" 68: end 69: end 70: 71: @bytes = @@random_device.read(16) 72: end