From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.141.43.5 with SMTP id v5cs33902rvj; Sun, 21 Feb 2010 08:51:53 -0800 (PST) Received-SPF: pass (google.com: domain of 3p2SBSwYJCtgA64IddAG4CF.6IGL46E-78P8FAIIAF8ALIOJM.6IG@groups.bounces.google.com designates 10.150.160.1 as permitted sender) client-ip=10.150.160.1; Authentication-Results: mr.google.com; spf=pass (google.com: domain of 3p2SBSwYJCtgA64IddAG4CF.6IGL46E-78P8FAIIAF8ALIOJM.6IG@groups.bounces.google.com designates 10.150.160.1 as permitted sender) smtp.mail=3p2SBSwYJCtgA64IddAG4CF.6IGL46E-78P8FAIIAF8ALIOJM.6IG@groups.bounces.google.com; dkim=pass header.i=3p2SBSwYJCtgA64IddAG4CF.6IGL46E-78P8FAIIAF8ALIOJM.6IG@groups.bounces.google.com Received: from mr.google.com ([10.150.160.1]) by 10.150.160.1 with SMTP id i1mr495655ybe.24.1266771112777 (num_hops = 1); Sun, 21 Feb 2010 08:51:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received:received :received:received:received-spf:received:mime-version:received:date :in-reply-to:x-ip:references:user-agent:x-http-useragent:message-id :subject:from:to:x-original-authentication-results:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:x-thread-url:x-message-url:sender:list-subscribe :list-unsubscribe:content-type:content-transfer-encoding; bh=dSnBOBFoRtvATm0Efw0gqy6wMCLrl7L2ZUxHa0d6Mzc=; b=NpUvBG3Mo88UhX0eiYMpp1h/v9V9KYiWioOCCIVF7rw2yxUDz2HMK5VxUkgukq3DO0 cjwUssc7cEj7rKmaYzV2EU4c75rVwihXVkCpFQU75D19jUbXt35gMX5dYp4s3N9r6Une Z3ZuQSpMtMi2k8HPcMc3LP1PFsXuIWf6SWJgU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:date:in-reply-to:x-ip :references:user-agent:x-http-useragent:message-id:subject:from:to :x-original-authentication-results:x-original-sender:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :x-thread-url:x-message-url:sender:list-subscribe:list-unsubscribe :content-type:content-transfer-encoding; b=YtMxIphlX8NxfDuRuzArUtAy1GORj99R3aDdse2uPMjLD+GPfNoAQCSemCKUFkpUdz EnS3Oaue/ubmyqPPth1msnaXaccyaSEupnBFWkZ/e6/XNWVHyRnbAwG3qFD8tRmuZncJ zt22WGEuomJbEB3RIBWMfi1/lZIepFEppnZrM= Received: by 10.150.160.1 with SMTP id i1mr33981ybe.24.1266771111542; Sun, 21 Feb 2010 08:51:51 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.151.16.12 with SMTP id t12ls2073781ybi.1.p; Sun, 21 Feb 2010 08:51:50 -0800 (PST) Received: by 10.151.88.33 with SMTP id q33mr17336403ybl.22.1266771109854; Sun, 21 Feb 2010 08:51:49 -0800 (PST) Received: by 10.101.195.7 with SMTP id x7mr7363694anp.12.1266767438302; Sun, 21 Feb 2010 07:50:38 -0800 (PST) Received: by 10.101.195.7 with SMTP id x7mr7363692anp.12.1266767438264; Sun, 21 Feb 2010 07:50:38 -0800 (PST) Return-Path: Received: from mail-yx0-f169.google.com (mail-yx0-f169.google.com [209.85.210.169]) by gmr-mx.google.com with ESMTP id 24si392877yxe.3.2010.02.21.07.50.38; Sun, 21 Feb 2010 07:50:38 -0800 (PST) Received-SPF: pass (google.com: domain of gcao99@gmail.com designates 209.85.210.169 as permitted sender) client-ip=209.85.210.169; Received: by mail-yx0-f169.google.com with SMTP id 41so10836811yxe.30 for ; Sun, 21 Feb 2010 07:50:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.150.241.2 with SMTP id o2mr89658ybh.85.1266767438147; Sun, 21 Feb 2010 07:50:38 -0800 (PST) Date: Sun, 21 Feb 2010 07:50:38 -0800 (PST) In-Reply-To: <2fff50391002192101x18f84aafh426d8eabd8fbc14b@mail.gmail.com> X-IP: 68.197.145.156 References: <2fff50391002192101x18f84aafh426d8eabd8fbc14b@mail.gmail.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6,gzip(gfe),gzip(gfe) Message-ID: Subject: Re: Use a different name instead of 'call' ? From: Guoliang Cao To: Rack Development X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of gcao99@gmail.com designates 209.85.210.169 as permitted sender) smtp.mail=gcao99@gmail.com X-Original-Sender: gcao99@gmail.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: X-Thread-Url: http://groups.google.com/group/rack-devel/t/b1349cb02a9145d3 X-Message-Url: http://groups.google.com/group/rack-devel/msg/66d7352a03741eeb Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thank you fro the clear explanation. - Cao On Feb 20, 12:01=A0am, Daniel N wrote: > Hi, > > The strength of rack is that it's a common standard. =A0A rack applicatio= n > must respond to call, and receive an argument, the environment. > > If you were to create middleware with a different entry method, how would > the calling middleware know what to call? =A0The standard says to call th= e > "call" method, thus, all middleware know how to execute all middleware / > applications. =A0By changing the names of methods, you're not not able to= call > it. > > If your application absolutely _must_ implement a call method, then you'l= l > need to wrap it. =A0If a module you're including defines a call method, t= hen > you'll need to divorce that from the actual middleware container. > > Your middleware can be a very simple wrapper around your object, but in > order to work the interface for rack must be preserved. > > HTH > Daniel > > On 20 February 2010 09:22, Guoliang Cao wrote: > > > Hi, > > > I'm relatively new here. Please forgive me if this has been asked > > before. > > > I'm wondering if it is possible to name 'call' differently in my > > middleware. Because 'call' is a relatively popular name and in case it > > is already used in one of the modules I included, I have to create a > > wrapper for my middleware. It'll be perfect if I can do something like > > this: > > > class MyMiddleware > > =A0def rack_call_method > > =A0 =A0 :my_rack_call > > =A0end > > > =A0def my_rack_call env > > =A0 =A0 # my middleware implementation goes here > > =A0end > > end > > > Thank you. > > > Cao > >