- attr.merge! PanelPicture.panelize(self.panel_pictures.map {|elm| elm.copy_attributes})
- attr.merge! SpeechBalloon.panelize(self.speech_balloons.map {|elm| elm.copy_attributes})
- attr.merge! GroundPicture.panelize(self.ground_pictures.map {|elm| elm.copy_attributes})
- attr.merge! GroundColor.panelize(self.ground_colors.map {|elm| elm.copy_attributes})
- p attr
+ Panel.each_element_class_names do |n|
+ attr.merge! Panel.class_name_to_class(n).panelize(self.elements_by_class_name(n).map {|elm| elm.copy_attributes})
+ end