Forum: Ruby on Rails Automatic Pluar to Singluar derivation in Loops

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Chatelain Olivier (Guest)
on 2006-05-22 14:59
(Received via mailing list)
Hallo,

Enyoing the Rails framework, I often write loop like this:

	for j_method in @service.j_methods
	   for parameter in j_method.parameters
		  @output = j_method.name+ " is in "+parameter.name
	   end
	end

So:
*	@service.j_methods =>  j_method
*	j_method.parameters => parameter

	forall @service.j_methods
	   forall j_method.parameters
		  @output = j_method.name+ " is in "+parameter.name
	   end
	end

Question:
*	How could such a functionality be done?

Thank you
Olivier
__________________________________________________

Olivier Ch√Ętelain
Change- und Configurationmanagement (CCCM)
Tel: +41 (0)31 666 52 45
Fax: +41 (0)31 666 16 09
mailto:removed_email_address@domain.invalid

RTC Real-Time Center AG
Schwarzenburgstrasse 160
3097 Liebefeld
__________________________________________________
This topic is locked and can not be replied to.