Sha256: 9106b81987045705b3cc49781ed2cd22a55636701ca92ab7929a419e4e0f7962
Contents?: true
Size: 456 Bytes
Versions: 104
Compression:
Stored size: 456 Bytes
Contents
module AmaLayout class NavigationItem include ActiveModel::Model include Draper::Decoratable 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
104 entries across 104 versions & 1 rubygems