johnjdevine-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Nov-12 03:00 UTC
ActionView::Base::ObjectWrapper -- What''s it for?
I''ve been going through the code and noticed this class as part of the ActionView base.rb. class ObjectWrapper < Struct.new(:value) #:nodoc: end As far as I can tell, it''s just used in render_partial_collection when calling render_partial, but the only thing that''s done with it is extract the value out of it again. As you can probably tell, I''m new to Ruby programming (mostly Java bg), so maybe there''s some magic that happens by putting it into a struct, or maybe it''s an extension point that people can use. If the latter is the case, would someone be able to provide an example of how it might be used? Appreciate any help, John Devine --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---