On Thu, Aug 2, 2012 at 10:08 PM, Intransition <[email protected]> wrote: > > > On Thursday, August 2, 2012 12:14:27 PM UTC-4, Robert Klemme wrote: >> >> On Thu, Aug 2, 2012 at 4:47 PM, Intransition <[email protected]> wrote: >> >> > Yes, that's the traditional factory approach. I actually would not want >> > to >> > use "MainFactory", as don't want it to be explicit. But it occurs to me >> > that >> > I could have redefined `Main.new` as a factory method and done it that >> > way. >> > And the more I think about it the more that seems like a better >> > approach. It >> > would work well for Main as well as other classes within it. >> >> It seems that in your case the caller decides on the version. Is that >> correct? > > > Yes, but it is actually via YAML file. It will read in, eg.
> Then when it does a `Main.load` on the file, it will look for the `revision` > field and determine which version of the API to use. So it's *not* the user deciding on the API version! That's a different situation. Or does the user present the loaded YAML file? Can you be a bit more specific about your usage scenario? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
