From: Trans Date: 2005-10-29T21:27:10+09:00 Subject: Re: Facets 2005-10-30 George Moschovitis wrote: > Hello Tom, > > > Time.use Facets, :stamp > > I would prefer this to be > > Time.use :facets, :stamp It is not right to "take-over" usage of #use just for Facets. This is a method analogous to 'use' in Perl and I have generalize it's applicaiton for everyone to use, working very much like append_features: class Module def package( name, &block ) @__package__ ||= {} return @__package__ unless block_given? @__package__[name.to_sym] = block end def provide_features( base, *selection ) selection.each do |s| base.class_eval( &@__package__[s.to_sym] ) end end def use( package, *selection ) package.provide_features( self, *selection ) end end > or > Time.use_facet : stamp This is hardly any differnt, but it is too particular. The new solution is something that can be commonly used theu is can become as recognizable as #require itself. > I also prefer the current form: > > require 'facets/time/stamp' Me too --becuase we're accustom to it. But a new way is needed to handle more advance fetures and it's not a good idea to hack require to do this. T.