From: "NARUSE, Yui" Date: 2011-12-04T12:34:00+09:00 Subject: [ruby-core:41470] Re: [ruby-trunk - Bug #5690][Open] Module#qualified_const_get (2011/12/01 5:59), Yehuda Katz wrote: > > Yehuda Katz > (ph) 718.877.1325 > > > 2011/11/30 Yukihiro Matsumoto > > > Hi, > > In message "Re: [ruby-core:41408] Re: [ruby-trunk - Bug #5690][Open] Module#qualified_const_get" > on Wed, 30 Nov 2011 16:52:36 +0900, Yehuda Katz > writes: > > |> * is there any use-case for this method? > | > |We use it often in Rails. > > Could you show us the concrete example? It is difficult for me to > imagine. > > > One case is to convert path names (file system paths) into constants. > > In general, Rails uses inflections to convert names from different contexts. In the router, for instance, "foo/bar" is used to represent namespaces, which are then converted into "Foo::Bar" and then Foo::Bar. "concrete exapmle" needs "what is the router?" and "when the router is used?". -- NARUSE, Yui