diff --git a/cookbook/016/04.rb b/cookbook/016/04.rb new file mode 100644 index 0000000..6447b2a --- /dev/null +++ b/cookbook/016/04.rb @@ -0,0 +1,10 @@ +require 'soap/rpc/driver' + +# doesn't work (service no longer available?) +driver = SOAP::RPC::Driver.new( + 'http://services.xmethods.net/soap/', 'url:xmethods-delayed-quotes' +) + +driver.add_method('getQuote', 'symbol') + +puts 'Stock price: %.2f' % driver.getQuote(ARGV.first)