From: Jason Lillywhite Date: 2009-06-05T04:44:57+09:00 Subject: Re: Use methods from a library in my own class > > options.each {|opt,val| plot.send opt, val} Thank you. That is a great idea and it works! 2 questions: 1. I see that your send method on plot.send is a method from Gnuplot::Plot.new but what exactly is it doing? My guess is it takes 'val' and sends it to the plot method that corresponds with 'opt' as it iterates through my hash. 2. How do I apply your idea to methods within an embedded array block such as "plot.data" from my code: plot.data << Gnuplot::DataSet.new( [x, y] ) do |ds| ds.with = "lines" end which has methods such as ds.linewidth, ds.title, etc? I tried multiple things like creating 2 hashes but can't get my hash values to pass into the embedded array. Thank you! -- Posted via http://www.ruby-forum.com/.