Class: TokyoMetro::App::Renderer::Concerns::Link::ToRailwayLinePage::ConnectingRailwayLine::FromPlatfromInfo

Inherits:
FromRailwayLinePage show all
Defined in:
lib/tokyo_metro/app/renderer/concerns/link/to_railway_line_page/connecting_railway_line/from_platform_info.rb

Instance Method Summary collapse

Constructor Details

#initialize(request, platform_transfer_info_decorated) ⇒ FromPlatfromInfo

Returns a new instance of FromPlatfromInfo.



3
4
5
6
7
# File 'lib/tokyo_metro/app/renderer/concerns/link/to_railway_line_page/connecting_railway_line/from_platform_info.rb', line 3

def initialize( request , platform_transfer_info_decorated )
  @platform_transfer_info_decorated = platform_transfer_info_decorated
  super( request , connecting_railway_line_info_in_initialize.decorate )
  @display_another_station_info = false
end

Instance Method Details

#renderObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/tokyo_metro/app/renderer/concerns/link/to_railway_line_page/connecting_railway_line/from_platform_info.rb', line 9

def render
  if to_render?
    h.render inline: <<-HAML , type: :haml , locals: h_locals
%li{ class: li_classes }
- if url.present?
  = link_to_unless( request.fullpath == url , "" , url )
%div{ class: div_classes }
  = railway_line_decorated.render_railway_line_code( small: small_railway_line_code )
  %div{ class: :railway_line }
    = railway_line_decorated.in_platform_transfer_info.render
    - if railway_direction_decorated.present?
      = railway_direction_decorated.render_in_station_facility_platform_info_transfer_info
    %p{ class: [ :time , :text_en ] , min: necessary_time }<
      = necessary_time
  - if optional_infos_to_display.present?
    - [ optional_infos_to_display ].flatten.each do | info |
      = info.call
    HAML
  end
end