Class: ActiveAdminMenu::Config
- Inherits:
-
Object
- Object
- ActiveAdminMenu::Config
- Defined in:
- lib/active_admin_menu/config.rb
Defined Under Namespace
Classes: FileNotFound, InvalidAttribute
Instance Attribute Summary collapse
-
#i18n_scope_prefix ⇒ Object
Returns the value of attribute i18n_scope_prefix.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#source ⇒ Object
Returns the value of attribute source.
-
#uncategorize_key_name ⇒ Object
Returns the value of attribute uncategorize_key_name.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #namespaced_source ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
23 24 25 26 27 |
# File 'lib/active_admin_menu/config.rb', line 23 def initialize @source = {} @uncategorize_key_name = "root" @i18n_scope_prefix = { parent: "active_admin.menu", label: "active_admin.menu" } end |
Instance Attribute Details
#i18n_scope_prefix ⇒ Object
Returns the value of attribute i18n_scope_prefix.
21 22 23 |
# File 'lib/active_admin_menu/config.rb', line 21 def i18n_scope_prefix @i18n_scope_prefix end |
#namespace ⇒ Object
Returns the value of attribute namespace.
21 22 23 |
# File 'lib/active_admin_menu/config.rb', line 21 def namespace @namespace end |
#source ⇒ Object
Returns the value of attribute source.
20 21 22 |
# File 'lib/active_admin_menu/config.rb', line 20 def source @source end |
#uncategorize_key_name ⇒ Object
Returns the value of attribute uncategorize_key_name.
21 22 23 |
# File 'lib/active_admin_menu/config.rb', line 21 def uncategorize_key_name @uncategorize_key_name end |
Instance Method Details
#namespaced_source ⇒ Object
35 36 37 |
# File 'lib/active_admin_menu/config.rb', line 35 def namespaced_source source[namespace] || source end |