Class: EasyAdmin::Configuration
- Inherits:
-
Object
- Object
- EasyAdmin::Configuration
- Defined in:
- lib/easy_admin/configuration.rb
Instance Attribute Summary collapse
-
#app_name ⇒ Object
Returns the value of attribute app_name.
-
#enable_profiler ⇒ Object
Returns the value of attribute enable_profiler.
-
#global_settings ⇒ Object
Returns the value of attribute global_settings.
-
#sidebar_items ⇒ Object
Returns the value of attribute sidebar_items.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #sidebar(&block) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 |
# File 'lib/easy_admin/configuration.rb', line 5 def initialize @app_name = "EasyAdmin" @sidebar_items = [] @global_settings = false @enable_profiler = Rails.env.development? end |
Instance Attribute Details
#app_name ⇒ Object
Returns the value of attribute app_name.
3 4 5 |
# File 'lib/easy_admin/configuration.rb', line 3 def app_name @app_name end |
#enable_profiler ⇒ Object
Returns the value of attribute enable_profiler.
3 4 5 |
# File 'lib/easy_admin/configuration.rb', line 3 def enable_profiler @enable_profiler end |
#global_settings ⇒ Object
Returns the value of attribute global_settings.
3 4 5 |
# File 'lib/easy_admin/configuration.rb', line 3 def global_settings @global_settings end |
#sidebar_items ⇒ Object
Returns the value of attribute sidebar_items.
3 4 5 |
# File 'lib/easy_admin/configuration.rb', line 3 def @sidebar_items end |
Instance Method Details
#sidebar(&block) ⇒ Object
12 13 14 15 16 |
# File 'lib/easy_admin/configuration.rb', line 12 def (&block) = SidebarBuilder.new .instance_eval(&block) if block_given? @sidebar_items = .items end |