Class: TokyoMetro::App::Renderer::RealTimeInfos::SideMenu::LinksToRailwayLinePages
- Inherits:
-
Factory::Decorate::MetaClass
- Object
- RailsDecorateFactory
- Factory::Decorate::MetaClass
- TokyoMetro::App::Renderer::RealTimeInfos::SideMenu::LinksToRailwayLinePages
- Defined in:
- lib/tokyo_metro/app/renderer/real_time_infos/side_menu/links_to_railway_line_pages.rb
Instance Method Summary collapse
-
#initialize(request) ⇒ LinksToRailwayLinePages
constructor
A new instance of LinksToRailwayLinePages.
- #render ⇒ Object
Constructor Details
#initialize(request) ⇒ LinksToRailwayLinePages
Returns a new instance of 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
#render ⇒ Object
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: <<-HAML , type: :haml , locals: h_locals %div{ id: :links_to_real_time_info_pages_of_railway_lines } %div{ class: :title }< %div{ class: :text_ja }< = "各路線のご案内" %div{ class: :text_en }< = "Pages related to railway lines" %ul{ id: :links_to_railway_line_pages , class: [ :links , :clearfix ] } - railway_lines.each do | railway_line | = ::TokyoMetro::App::Renderer::RealTimeInfos::SideMenu::LinkToRailwayLinePage.new( request , railway_line.decorate , controllers ).render HAML end |