I have a model source (name, url, method) The program parses the source's url for data. Now I have differen classes for parsing different types of urls: rss, xml, ogdata ...
So I have a common interface
new(url) //Parses the url
getTitle() //Get the title of the data
getPrice() //Get the price
And I have four classes rss, xml, ogdata. These classes are in seperate files. The idea is to add more classes as I discover different types of pages. I want to initiate the right classes for the url.
method=source.method //NOw I want to create a new class of the name specified in method
parser=Rss.new(source.url)//Instead of this //Something like parser=.new(source.url)