From: Gregory Seidman Date: 2008-02-28T22:13:51+09:00 Subject: Re: YAML On Thu, Feb 28, 2008 at 10:04:57PM +0900, aidy wrote: > Hi Greg, > > Thanks for you help but I am having trouble losing the hash value when > calling the method I don't know what you mean by that. > one.rb > > def SmokeTest.create_from_yaml_file(filename) > data = YAML.load_file(filename) > obj = new(data['test'], data['url']) > obj.register(data['first_name'], data['surname'], data['email'], > data['password'], data['registration']) > end [...] This is incorrect. You are missing the last line from the method I originally wrote, which is just obj. If you don't have that, the create_from_yaml method returns whatever obj.register returns, rather than the created object itself. This may be the problem you are having. > Cheers > Aidy --Greg