module Rtml::WidgetCore::WidgetAccessorInstanceMethods def widget_instances @widget_instances ||= [] end delegate :class_widget_proxies, :class_widget_entry_points, :to => 'self.class' def singleton_widgets; (class << self; self; end).class_widgets ||= [] end def singleton_widget_proxies; (class << self; self; end).class_widget_proxies ||= [] end def singleton_widget_entry_points; (class << self; self; end).class_widget_entry_points ||= [] end def widgets; singleton_widgets + (self.class_widgets ||= []) end def widget_proxies; singleton_widget_proxies + (self.class_widget_proxies ||= []) end def widget_entry_points; singleton_widget_entry_points + (self.class_widget_entry_points ||= []) end alias class_widget_methods class_widget_entry_points alias singleton_widget_methods singleton_widget_entry_points alias widget_methods widget_entry_points end