From: aidy Date: 2008-02-28T05:44:55+09:00 Subject: Re: YAML Hi Greg On Feb 27, 7:33 pm, Gregory Seidman wrote: > On Thu, Feb 28, 2008 at 04:24:58AM +0900, aidy wrote: > > All I want it to read this YAML as a ruby hash and place into the > > below methods. Could someone help? > > > test: tiscali > > url:  http://tiscali3-test.vizumi.com/ > > register: > >   first_name: aidy > >   surname: smith > >   email: 'testautomat...@googlemail.com' > >   password: password > >   registration: KJHDF123 > > > tiscali= SmokeTest.new("Tiscali", "http://tiscali3-test.vizumi.com/") > > tiscali.register('aidy', 'smith, 'testautoma...@googlemail.com', > > 'password', 'KJHDF123') > > require 'yaml' > > 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']) >   obj > end > > tiscali = SmokeTest.create_from_yaml_file('tiscali.yml') > > > Aidy > > --Greg- Hide quoted text - > Brilliant thanks. Aidy