On 15.08.2010 12:25, Samuel Sternhagen wrote:
> I am writing a Ruby program that creates different URL queries. Right
> now I have way too many methods to achieve this. Is there a way to do
> this in Ruby to eliminate the need for so many methods?

Without further information about what all these methods do it's 
difficult to come up with good suggestions.  For the case below see my 
answer below.

> Each of these method calls a create_url method that concatenates a
> string representing the URL.
>
> like this:
>
> def getUse(username)
>     create_url(username)
> end
>
> def getPage(page)
>     create_url(page)
> end
>
> There are like 150 - 200 methods like this.
>
> could you spare a paradigm?

There is no point in having methods like above: they don't do anything 
other than forwarding the parameter.  Just get rid of them.

Btw, according to Ruby naming convention methods should be named 
"get_use" and "get_page".

Kind regards

	robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/