Sha256: 75f6265ce63cc73d1416e52f30e602990d36be7598e448b9f2469ffea6e13066
Contents?: true
Size: 510 Bytes
Versions: 2
Compression:
Stored size: 510 Bytes
Contents
# frozen_string_literal: true module Sunrise module Config class NavigationItem attr_accessor :name, :url def initialize(name, url, scope = 'items', options = {}) @name = name @scope = scope @url = url @title = options.delete(:title) @options = options end def title @title ||= I18n.t(@name, scope: [:manage, :menu, @scope]) end def html_options @options.nil? ? {} : @options.dup end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sunrise-cms-1.1.1 | lib/sunrise/config/navigation_item.rb |
sunrise-cms-1.1.0 | lib/sunrise/config/navigation_item.rb |