From: Pit Capitain Date: 2007-03-08T21:09:52+09:00 Subject: Re: How To Find The Name Of A Variable Andrew Stewart schrieb: > (...) > And I call it like this: > > ... if line_item_relevant @line_item_jacket, :line_item_jacket > > And like this: > > ... if line_item_relevant @line_item_shirt, :line_item_shirt > > Et cetera. > > It would be less repetitive if I could ditch the symbol argument to the > method. Hence my original question. Andy, you could try to change the way you create your line item objects. Instead of storing them in separate instance variables, you could store them in a Hash. Instead of @line_item_jacket = create_line_item_jacket @line_item_shirt = create_line_item_shirt you could do something like @line_items = {} @line_items[ :line_item_jacket ] = create_line_item_jacket @line_items[ :line_item_shirt ] = create_line_item_shirt then you can just do if line_item_relevant :line_item_shirt Regards, Pit