--001636e90df95001300463c25730
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

You end up needing to do:

Extlib::String.constantize(Extlib::String.to_path(Extlib::String.underscore(str)))

instead of:

str.underscore.to_path.constantize

Honestly, we tried this in DataMapper for a while, but it got too bulky to
be realistic (outside of Java, I suppose).

-- Yehuda

2009/2/25 Radosw Buウat <radek.bulat / gmail.com>

> Yehuda, I wonder on one thing. If you want in your framework/library
> custom method behavior, for example String#foo and you want only use
> it inside framework/library why not just put it somewhere inside
> framework class? For example instead:
> "bar".foo
>
> just do this:
> MyFramework.foo("bar")
>
> ?
>
> The second is even cleaner and says clearly what method you call.
> Using NS you must remember which method you imported to file and which
> not.
>
>
> --
> Pozdrawiam
>
> Radosウaw Buウat
> http://radarek.jogger.pl - m blog
>
>


-- 
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325

--001636e90df95001300463c25730
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

You end up needing to do:<br><br>Extlib::String.constantize(Extlib::String.to_path(Extlib::String.underscore(str)))<br><br>instead of:<br><br>str.underscore.to_path.constantize<br><br>Honestly, we tried this in DataMapper forhile, but it got too bulky to be realistic (outside of Java, I suppose).<br>
<br>-- Yehuda<br><br><div class="gmail_quote">2009/2/25 Radosw Buウat <span dir="ltr">&lt;radek.bulat / gmail.com&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yehuda, I wonder on one thing. If you want in your framework/library<br>
custom method behavior, for example String#foo and you want only use<br>
it inside framework/library why not just put it somewhere inside<br>
framework class? For example instead:<br>
&quot;bar&quot;.foo<br>
<br>
just do this:<br>
MyFramework.foo(&quot;bar&quot;)<br>
<br>
?<br>
<br>
The second is even cleaner and says clearly what method you call.<br>
Using NS you must remember which method you imported to file and which<br>
not.<br>
<font color="#888888"><br>
<br>
--<br>
Pozdrawiam<br>
<br>
Radosウaw Buウat<br>
<a href="http://radarek.jogger.pl" target="_blank">http://radarek.jogger.pl</a> - m blog<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Yehuda Katz<br>Developer | Engine Yard<br>(ph) 718.877.1325<br>

--001636e90df95001300463c25730--