class Aerogel::Admin::Menu::Item
Attributes
icon[RW]
label[RW]
priority[RW]
url[RW]
Public Class Methods
create( url, opts = {} )
click to toggle source
# File lib/aerogel/admin/menu.rb, line 25 def self.create( url, opts = {} ) Menu.instance.items << self.new( url, opts ) end
new( url, opts = {} )
click to toggle source
# File lib/aerogel/admin/menu.rb, line 18 def initialize( url, opts = {} ) self.url = url self.icon = opts[:icon] self.label = opts[:label] || url self.priority = opts[:priority] || 50 end
Public Instance Methods
human_label()
click to toggle source
# File lib/aerogel/admin/menu.rb, line 29 def human_label if label.is_a? Symbol I18n.t label else label.humanize end end