Class: ActiveAdmin::MenuItem
- Inherits:
-
Object
- Object
- ActiveAdmin::MenuItem
- Defined in:
- lib/active_material_icon/menu_item.rb
Instance Attribute Summary collapse
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
Instance Method Summary collapse
-
#initialize(options = {}) {|_self| ... } ⇒ MenuItem
constructor
A new instance of MenuItem.
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ MenuItem
Returns a new instance of MenuItem.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/active_material_icon/menu_item.rb', line 6 def initialize( = {}) super() # MenuNode @icon = "<i class='material-icons'>#{[:icon] || "arrow_right" }</i>" @label = [:label] @dirty_id = [:id] || [:label] @url = [:url] || '#' @priority = [:priority] || 10 @html_options = [:html_options] || {} @should_display = [:if] || proc { true } @parent = [:parent] yield(self) if block_given? # Builder style syntax end |
Instance Attribute Details
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
4 5 6 |
# File 'lib/active_material_icon/menu_item.rb', line 4 def icon @icon end |