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