Module: Faalis::Dashboard::Sections::Sidebar::ClassMethods
- Defined in:
- lib/faalis/dashboard/sections/sidebar.rb
Instance Method Summary collapse
Instance Method Details
#sidebar(name, **options, &block) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/faalis/dashboard/sections/sidebar.rb', line 28 def (name, **, &block) side = Faalis::Dashboard::Models::Sidebar.new(name, **) side.instance_eval do block.call if block_given? end define_method(:setup_sidebar) do instance_variable_set('@sidebar', side) end end |