From: seebs@... (Peter Seebach) Date: 2007-05-27T17:37:16+09:00 Subject: Re: Can an initialize method fail? In message <46593D6A.5010300@blackkettle.org>, Alex Young writes: >I'd use a different class method, like User.login, or some such. Then >you can return either a valid User instance or nil as required. If you >want to completely avoid exceptions, you'll either need to have a >#valid? method in the instance, or actually do the credential validation >at the class level (which seems slightly wrong to me, but there you go). Oh, that might be a good choice. Might even be a good case for one of those factory methods. :) Hadn't thought of that, but I like it. That might simplify some logic elsewhere. -s