Forum: Ruby Question about soap/wsdlDriver

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
B0751d600308d3546433c09bfb2ade63?d=identicon&s=25 Matt Long (Guest)
on 2006-05-08 20:49
(Received via mailing list)
Hi all,

I ran into an oddity the other day as I was chunking through
pickaxe.  I checked google, but did not see this specific problem,
nor did I see it in the errata for the book.

I am doing the Google query example, and can run the query no
problem.  I get back a result set as I expect.  E.g. the first
element of a search for "ruby":
    irb(main):020:0> p result.resultElements[0]
    {}URL="" {}cachedSize="18k"
    {}relatedInformationPresent="true" {}snippet="Interpreted,
dynamically typed, pure
    object-oriented, scripting language for<br> fast, easy
programming, from Japan. Simple,
    straightforward, extensible." {}summary=#<SOAP::Mapping::Object:
    {}title="<b>Ruby</b>"> => nil

but, if I do the following, I get an error:

     irb(main):021:0> p result.resultElements[0].URL
     NoMethodError: undefined method `URL' for
             from (irb):21

The strangeness is that URL, is defined, but the accessor was renamed
to "uRL":

     irb(main):022:0> p result.resultElements[0].methods.sort
     [... "uRL", "uRL=", ...]
     => nil

So using uRL instead of URL "fixes" the example in the book
     irb(main):023:0> p result.resultElements[0].uRL
     => nil

Is this something specific to my environment, or is there something I
missed in some documentation somewhere?


Matt Long                               /
University of South Florida, CRASAR
GnuPG public key:

I don't have any solution, but I certainly admire the problem.
- Ashleigh Brilliant
This topic is locked and can not be replied to.