From: Chad Fowler Date: 2003-09-09T21:11:27+09:00 Subject: Re: ANN: MetaTags 1.0 On Tue, 9 Sep 2003, Dave Thomas wrote: # # A suggestion for a convention: rather than go down the strange # punctuation route (%Y{...} etc), could we just not adopt the convention # that, where sensible, each class that can construct instances from a # string should define a top-level method with the same name as the class. # This looks like a very sensible approach. An interesting challenge now: is it possible to create a new coding convention for a community simply by suggesting it? :) # So, if I wrote a class called Caml, I'd also define a top-level method, # also called Caml, something like: # # class Caml # def Caml.from_string(str) # # .. check string format .. # self.new(str) # or something similar # end # end # # def Caml(str) # Caml.from_string(str) # end #