Class: SidebarRegistry

Inherits:
Object
  • Object
show all
Defined in:
lib/sidebar_registry.rb

Class Method Summary collapse

Class Method Details

.available_sidebar_typesObject



13
14
15
# File 'lib/sidebar_registry.rb', line 13

def available_sidebar_types
  registered_sidebars.sort
end

.available_sidebarsObject



9
10
11
# File 'lib/sidebar_registry.rb', line 9

def available_sidebars
  registered_sidebars.sort.map(&:constantize)
end

.register_sidebar(klass_name) ⇒ Object



5
6
7
# File 'lib/sidebar_registry.rb', line 5

def register_sidebar(klass_name)
  registered_sidebars << klass_name.to_s
end