Sha256: eb4b7f62ac9db8e3a35435fa6c9d519f3d4b7f4dadbd5d61b6836a9b406b6f3a
Contents?: true
Size: 498 Bytes
Versions: 19
Compression:
Stored size: 498 Bytes
Contents
require 'delegate' class MenuSectionPresenter < SimpleDelegator def name yield(section.name) if section.respond_to? :name end def links return [] unless section.respond_to? :links @links ||= ThemePresentation.wrap_collection(section.links, MenuLinkPresenter) end def widgets return [] unless section.respond_to? :widgets @widgets ||= ThemePresentation.wrap_collection(section.widgets, MenuWidgetPresenter) end private def section __getobj__ end end
Version data entries
19 entries across 19 versions & 1 rubygems