Sha256: 887197e14cb57335bfb6af0159f88aa8234eb445821f8da9a4d3809454bccc62
Contents?: true
Size: 501 Bytes
Versions: 27
Compression:
Stored size: 501 Bytes
Contents
module AmaLayout class NavigationItem include ActiveModel::Model def decorate AmaLayout::NavigationItemDecorator.new(self) end attr_accessor :text, :icon, :link, :target, :alt, :sub_nav, :current_url def initialize(args = {}) self.current_url = args[:current_url] super end def sub_nav=(items) @sub_nav = items.map { |i| NavigationItem.new i.merge({ current_url: current_url}) } end def sub_nav @sub_nav || [] end end end
Version data entries
27 entries across 27 versions & 1 rubygems