Class: TokyoMetro::App::Renderer::SideMenu
Defined Under Namespace
Modules: Link
Classes: NowDeveloping, Problems
Class Method Summary
collapse
Class Method Details
.all_list(request) ⇒ Object
23
24
25
|
# File 'lib/tokyo_metro/app/renderer/side_menu.rb', line 23
def all_list( request )
list_names.map { | list_name | list_class_name.send( list_name , request ) }
end
|
.list_class_name ⇒ Object
.list_names ⇒ Object
19
20
21
|
# File 'lib/tokyo_metro/app/renderer/side_menu.rb', line 19
def list_names
[ :to_main_contents , :to_documents , :to_other_websites ]
end
|
.render_all(request) ⇒ Object
3
4
5
6
7
8
9
|
# File 'lib/tokyo_metro/app/renderer/side_menu.rb', line 3
def self.render_all( request )
h.render inline: <<-HAML , type: :haml , locals: { all_list: all_list( request ) }
%div{ id: :side_menu }
- all_list.each do | list |
= list.render
HAML
end
|