Sha256: ccc21679be85ac829a3b8272d939778374dd4e85ec2c3878eea340edee8fba74
Contents?: true
Size: 777 Bytes
Versions: 29
Compression:
Stored size: 777 Bytes
Contents
# frozen_string_literal: true module PagesCore class AdminMenuItem attr_reader :label, :path, :group, :options class << self def items return [] unless @menu_items @menu_items.map { |_, v| v } end def register(label, path, group = :custom, options = {}) entry = new(label, path, group, options) @menu_items ||= {} @menu_items[[group, label]] = entry end end def initialize(label, path, group = :custom, options = {}) @label = label @path = path @group = group @options = options end def ==(other) other && other.label == label && other.path == path && other.group == group && other.options == options end end end
Version data entries
29 entries across 29 versions & 1 rubygems