to_csv missing?
|
|
I have the following version of scrubyt installed scrubyt (0.3.4) A powerful Web-scraping framework built on Mechanize and Hpricot Since I believe the to_csv function was added in 0.2.8, I assume it should be there. Writing to_xml works: symbol_data.to_xml.write($stdout,1) But writing to_csv does not: symbol_data.to_csv.write($stdout,1) When I try to execute the above, I get: /usr/local/lib/ruby/gems/1.8/gems/RubyInlineAcceleration-0.0.1/lib/inline_acceleration.rb:101:in `method_missing’: undefined method `to_csv’ for #<scrubyt::scrubytresult:0x28c96bc> (NoMethodError) from ./folioCheck.rb:161:in `get_prices_all_funds’ from ./folioCheck.rb:172 Any suggestions? Thanks! Chris |
|
|
Well it’s not there… just because the internals changed a lot and I was lazy to write a new to_csv function :) The problem is that generally to_csv from a tree doesn’t make much sense. Yeah, if the xml is flat, then it is pretty straightforward how should to_Csv look like, but if the real world you have all kinds of oddities, missing stuff etc. so I think to_csv has to be tailored to your own needs anyway… |
|
|
Thanks! Yeah, I went looking for the to_csv function in the code, and it looks like the entire result_dumper.rb file (where to_csv was defined) is no longer used. |