Class: ActiveAdmin::MenuTree::Config
- Inherits:
-
Object
- Object
- ActiveAdmin::MenuTree::Config
- Defined in:
- lib/activeadmin/menu_tree/config.rb
Overview
ActiveAdmin::MenuTree::Config class
Instance Attribute Summary collapse
-
#menu_options ⇒ Object
readonly
Returns the value of attribute menu_options.
-
#menu_tree ⇒ Object
Returns the value of attribute menu_tree.
Instance Method Summary collapse
- #find_menu_option(id:) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 11 |
# File 'lib/activeadmin/menu_tree/config.rb', line 8 def initialize @menu_tree = [] @menu_options = [] end |
Instance Attribute Details
#menu_options ⇒ Object (readonly)
Returns the value of attribute menu_options.
6 7 8 |
# File 'lib/activeadmin/menu_tree/config.rb', line 6 def @menu_options end |
#menu_tree ⇒ Object
Returns the value of attribute menu_tree.
6 7 8 |
# File 'lib/activeadmin/menu_tree/config.rb', line 6 def @menu_tree end |
Instance Method Details
#find_menu_option(id:) ⇒ Object
21 22 23 |
# File 'lib/activeadmin/menu_tree/config.rb', line 21 def (id:) .find { |item| item[:id] == id } end |