* Using various paths in same "map"
@ 2009-09-10 17:59 Iñaki Baz Castillo
2009-09-10 18:02 ` Magnus Holm
0 siblings, 1 reply; 3+ messages in thread
From: Iñaki Baz Castillo @ 2009-09-10 17:59 UTC (permalink / raw)
To: rack-devel
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Using various paths in same "map"
2009-09-10 17:59 Using various paths in same "map" Iñaki Baz Castillo
@ 2009-09-10 18:02 ` Magnus Holm
2009-09-10 18:09 ` Iñaki Baz Castillo
0 siblings, 1 reply; 3+ messages in thread
From: Magnus Holm @ 2009-09-10 18:02 UTC (permalink / raw)
To: rack-devel
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>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Using various paths in same "map"
2009-09-10 18:02 ` Magnus Holm
@ 2009-09-10 18:09 ` Iñaki Baz Castillo
0 siblings, 0 replies; 3+ messages in thread
From: Iñaki Baz Castillo @ 2009-09-10 18:09 UTC (permalink / raw)
To: rack-devel
2009/9/10 Magnus Holm <judofyr@gmail.com>:
>
> You can always do something like this:
>
> code = proc do
> use Something
> run AnotherThing
> end
>
> map "/yes", &code
> map "/no", &code
Thanks.
--
Iñaki Baz Castillo
<ibc@aliax.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-10 18:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-10 17:59 Using various paths in same "map" Iñaki Baz Castillo
2009-09-10 18:02 ` Magnus Holm
2009-09-10 18:09 ` Iñaki Baz Castillo
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).