box-o-sand/RubyFun/cookbook/016/04.rb
Dan Buch 0a9428093c Add 'RubyFun/' from commit 'b01c6826131196ba58b5288a3182f2526c89c249'
git-subtree-dir: RubyFun
git-subtree-mainline: a04a502787
git-subtree-split: b01c682613
2013-01-09 23:50:14 -05:00

11 lines
274 B
Ruby

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)