# File lib/uuid.rb, line 458 458: def generate(format = :default) 459: @socket.write "\0" 460: uuid = @socket.read(36) 461: return uuid if format == :default 462: template = FORMATS[format] 463: raise ArgumentError, "invalid UUID format #{format.inspect}" unless template 464: template % uuid.split("-").map { |p| p.to_i(16) } 465: end