Well, you're working with an Enumerable object at that point. I think
you'd do just fine with Enumerable#find

http://www.ruby-doc.org/core/classes/Enumerable.html#M003154

@specific_blurb = @blurbs.find { |b| b.name == "Something specific" }

You might mix a helper method into Enumerable that abstracts some of that out.

module Enumerable
 def find_by_name(str)
   find { |obj| obj.name == str }
 end
end

Then all you'd need to do is @blurbs.find_by_name("Something specific")

Good question! I hope that helps :-)

--
Nick Zadrozny • http://missionsbridge.org/people/nick
_______________________________________________
Sdruby mailing list
[EMAIL PROTECTED]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to