# File lib/uuid.rb, line 404
404:     def generate(format = :default)
405:       @socket.write "\0"
406:       uuid = @socket.read(36)
407:       return uuid if format == :default
408:       template = FORMATS[format]
409:       raise ArgumentError, "invalid UUID format #{format.inspect}" unless template
410:       template % uuid.split("-").map { |p| p.to_i(16) }
411:     end