Class: TokyoMetro::App::Renderer::RealTimeInfos::SideMenu::LinksToRailwayLinePages

Inherits:
Factory::Decorate::MetaClass show all
Defined in:
lib/tokyo_metro/app/renderer/real_time_infos/side_menu/links_to_railway_line_pages.rb

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ LinksToRailwayLinePages



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/tokyo_metro/app/renderer/real_time_infos/side_menu/links_to_railway_line_pages.rb', line 3

def initialize( request )
  super( request )
  @railway_lines = ::RailwayLine.tokyo_metro( including_branch_line: false )

  @controllers = {
    train_operation: {
      ja: ::TrainOperation::InfoDecorator.common_title_ja ,
      en: ::TrainOperation::InfoDecorator.common_title_en
    } ,
    train_location: {
      ja: ::TrainLocationDecorator.common_title_ja ,
      en: ::TrainLocationDecorator.common_title_en
    } ,
    railway_line: {
      ja: ::RailwayLineDecorator.common_title_ja ,
      en: ::RailwayLineDecorator.common_title_en
    }
  }
end

Instance Method Details

#renderObject



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/tokyo_metro/app/renderer/real_time_infos/side_menu/links_to_railway_line_pages.rb', line 23

def render
  h.render inline: "%div{ id: :links_to_real_time_info_pages_of_railway_lines }\n%div{ class: :title }<\n  %div{ class: :text_ja }<\n    = \"\u5404\u8DEF\u7DDA\u306E\u3054\u6848\u5185\"\n  %div{ class: :text_en }<\n    = \"Pages related to railway lines\"\n%ul{ id: :links_to_railway_line_pages , class: [ :links , :clearfix ] }\n  - railway_lines.each do | railway_line |\n    = ::TokyoMetro::App::Renderer::RealTimeInfos::SideMenu::LinkToRailwayLinePage.new( request , railway_line.decorate , controllers ).render\n  HAML\nend\n" , type: :haml , locals: h_locals