rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Magnus Holm <judofyr@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: Using various paths in same "map"
Date: Thu, 10 Sep 2009 20:02:02 +0200	[thread overview]
Message-ID: <391a49da0909101102m3199469bxdc2fb7ac396dfcfe@mail.gmail.com> (raw)
In-Reply-To: <cc1f582e0909101059g30188dd7p455d5c67b399e37a@mail.gmail.com>


You can always do something like this:

code = proc do
  use Something
  run AnotherThing
end

map "/yes", &code
map "/no", &code

//Magnus Holm



On Thu, Sep 10, 2009 at 19:59, Iñaki Baz Castillo<ibc@aliax.net> wrote:
>
> Hi, by inspecting the URLMap code I understand that some concept as
> follows is not possible:
>
>  map [ "/main1" , "/main2" ] do
>
> Is there any way to achieve it? I wouldn't like to duplicate the code
> into "/main1" and "/main2".
>
> Thanks for any suggestion.
>
> --
> Iñaki Baz Castillo
> <ibc@aliax.net>
>

  reply	other threads:[~2009-09-10 18:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-10 17:59 Using various paths in same "map" Iñaki Baz Castillo
2009-09-10 18:02 ` Magnus Holm [this message]
2009-09-10 18:09   ` Iñaki Baz Castillo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=391a49da0909101102m3199469bxdc2fb7ac396dfcfe@mail.gmail.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).