Net::HTTP.start("#{DOMAIN_URL}") { |http|
resp = http.get(PARAMS)
open( "#{OUTPUT_DIR}/#{file_name}.png", 'wb' ) { |file|
file.write(resp.body)
}
}
Where DOMAIN_URL: http://chart.apis.google.com
PARAMS:
/chart?cht=bvg&chbh=a&chd=s:vttusty&chs=500x300&chxt=x,y&chxl=0:|Sun|Mon|Tue|Wed|Thu|Fri|Sat|1:|0|2|4|6|8|10|12
Thanks
Brijesh Shah
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.