--0016e644b91443fc6e04b1ab543d
Content-Type: text/plain; charset=ISO-8859-1

Totally agreed. This pattern is fairly common. It would also be nice to
have Module#modules or something, such that Foo::Bar would return [Foo,
Bar].

Yehuda Katz
(ph) 718.877.1325


On Sun, Nov 13, 2011 at 6:17 PM, Thomas Sawyer <transfire / gmail.com> wrote:

>
> Issue #5628 has been reported by Thomas Sawyer.
>
> ----------------------------------------
> Feature #5628: Module#basename
> http://redmine.ruby-lang.org/issues/5628
>
> Author: Thomas Sawyer
> Status: Open
> Priority: Normal
> Assignee:
> Category:
> Target version: 1.9.4
>
>
> Something I use fairly often:
>
>    some_module.name.split("::").last
>
> It's useful for things like factory methods. It would be much nicer if we
> had:
>
>    class Module
>      def basename
>        name.split("::").last
>      end
>    end
>
>
>
>
> --
> http://redmine.ruby-lang.org
>
>

--0016e644b91443fc6e04b1ab543d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Totally agreed. This pattern is fairly common. It would also be nice to have Module#modules or something, such that Foo::Bar would return [Foo, Bar].<div><br clear="all">Yehuda Katz<br>(ph) 718.877.1325<br>
<br><br><div class="gmail_quote">On Sun, Nov 13, 2011 at 6:17 PM, Thomas Sawyer <span dir="ltr">&lt;transfire / gmail.com&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
Issue #5628 has been reported by Thomas Sawyer.<br>
<br>
----------------------------------------<br>
Feature #5628: Module#basename<br>
<a href="http://redmine.ruby-lang.org/issues/5628" target="_blank">http://redmine.ruby-lang.org/issues/5628</a><br>
<br>
Author: Thomas Sawyer<br>
Status: Open<br>
Priority: Normal<br>
Assignee:<br>
Category:<br>
Target version: 1.9.4<br>
<br>
<br>
Something I use fairly often:<br>
<br>
  ¨Βονείνοδυμε®ξανε®σπμιτ¨¦ρυοτ»ΊΊ¦ρυοτ»©®μαστΌβςΎ
<br>
It&#39;s useful for things like factory methods. It would be much nicer if we had:<br>
<br>
  ¨Βμασσ ΝοδυμεΌβςΎ
  ¨Βεζ βασεξανεΌβςΎ
  ¨Βανε®σπμιτ¨¦ρυοτ»ΊΊ¦ρυοτ»©®μαστΌβςΎ
  ¨ΒξδΌβςΎ
  ¨ΒξδΌβςΎ
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
--<br>
<a href="http://redmine.ruby-lang.org" target="_blank">http://redmine.ruby-lang.org</a><br>
<br>
</font></span></blockquote></div><br></div>

--0016e644b91443fc6e04b1ab543d--