Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #4218

Re: Starting Method/Class issues

From 7stud -- <bbxx789_05ss@yahoo.com>
Newsgroups comp.lang.ruby
Subject Re: Starting Method/Class issues
Date 2011-05-10 19:26 -0500
Organization Service de news de lacave.net
Message-ID <95ea7c810f1fbc89f31db3970ec7a3de@ruby-forum.com> (permalink)
References <db27adb124f75fd3cd3e99b520e711c7@ruby-forum.com> <71429885376e6338580943ad50c8eb2e@ruby-forum.com> <3caa79ffaf43a52149b9003788552318@ruby-forum.com>

Show all headers | View raw


TJ Wilkes wrote in post #997849:
> def verify(x)
> print "Verifying ", v, "."
> ie.link(:id, x).exist?
> print "Actual Result:"
>   if ie.text.include? x
>   puts "  Test Passed. Found the test string: ", x, ".  Actual Results
> match expected Results."
>   ie.link(:href, x).click
> else
>   puts "  Test Failed!  Could not find: ", x, "."
> end
> end

Inside that method, there is no variable called 'ie'.  You either need 
to create ie inside the method, or you need to pass ie in as an 
argument, like this:

def verify(x, obj)
   obj.link(:id, x).exist?
   ...
   ...
end

-- 
Posted via http://www.ruby-forum.com/.

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Starting Method/Class issues TJ Wilkes <tjwilkes@live.com> - 2011-05-10 12:32 -0500
  Re: Starting Method/Class issues Robert Klemme <shortcutter@googlemail.com> - 2011-05-10 22:18 +0200
  Re: Starting Method/Class issues 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-10 16:07 -0500
    Re: Starting Method/Class issues TJ Wilkes <tjwilkes@live.com> - 2011-05-10 16:34 -0500
      Re: Starting Method/Class issues 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-10 19:26 -0500
    Re: Starting Method/Class issues Brian Candler <b.candler@pobox.com> - 2011-05-11 03:39 -0500
  Re: Starting Method/Class issues TJ Wilkes <tjwilkes@live.com> - 2011-05-11 14:28 -0500
    Re: Starting Method/Class issues 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-11 14:56 -0500
  Re: Starting Method/Class issues TJ Wilkes <tjwilkes@live.com> - 2011-05-11 16:04 -0500
    Re: Starting Method/Class issues 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-11 17:39 -0500

csiph-web