Class: TokyoMetro::App::Renderer::StationFacility::Platform::Info::MultipleRailwayLines::EachDirection

Inherits:
TokyoMetro::App::Renderer::StationFacility::Platform::Info::MetaClass::EachDirection show all
Includes:
Common
Defined in:
lib/tokyo_metro/app/renderer/station_facility/platform/info/multiple_railway_lines/each_direction.rb

Instance Attribute Summary

Attributes included from Common

#railway_lines

Attributes inherited from TokyoMetro::App::Renderer::StationFacility::Platform::Info::MetaClass::EachDirection

#platform_infos, #railway_direction

Instance Method Summary collapse

Methods included from Common

#railway_line_info

Methods inherited from TokyoMetro::App::Renderer::StationFacility::Platform::Info::MetaClass::EachDirection

#initialize, #render, #render_barrier_free_facility_infos, #render_car_number_array_if_one_car_composition_type, #render_infos_of_each_platform, #render_surrounding_area_infos, #render_transfer_infos

Methods included from TokyoMetro::App::Renderer::StationFacility::Platform::Info::MetaClass::Common

#barrier_free_facility_infos, #car_composition_types, #has_barrier_free_facility_infos?, #has_one_car_composition_type?, #has_railway_direction_infos?, #has_surrounding_area_infos?, #has_transfer_infos?, #max_car_composition, #railway_line_css_class_name, #railway_line_name_en, #railway_line_name_ja, #surrounding_area_infos, #tab_name, #transfer_infos

Constructor Details

This class inherits a constructor from TokyoMetro::App::Renderer::StationFacility::Platform::Info::MetaClass::EachDirection

Instance Method Details

#of_special_direction?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/tokyo_metro/app/renderer/station_facility/platform/info/multiple_railway_lines/each_direction.rb', line 24

def of_special_direction?
  false
end

#render_direction_infoObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/tokyo_metro/app/renderer/station_facility/platform/info/multiple_railway_lines/each_direction.rb', line 5

def render_direction_info
  if @railway_direction.present?
    h.render inline: <<-HAML , type: :haml , locals: h_locals
%div{ class: :info_of_railway_direction }
%div{ class: :title_of_direction }
  - if info.of_special_direction?
    %h4{ class: :text_ja }<
      = info.render_special_direction_ja
    %h5{ class: :text_en }<
      = info.render_special_direction_en
  - else
    %h4{ class: :text_ja }<
      = info.railway_direction.station_info.decorate.render_name_ja( with_subname: true , suffix: "方面行きホーム" )
    %h5{ class: :text_en }<
      = info.railway_direction.station_info.decorate.render_name_en( with_subname: true , prefix: "Platform for " )
    HAML
  end
end

#render_special_direction_enObject



32
33
34
35
36
# File 'lib/tokyo_metro/app/renderer/station_facility/platform/info/multiple_railway_lines/each_direction.rb', line 32

def render_special_direction_en
  h.render inline: <<-HAML , type: :haml , locals: { special_direction_en: special_direction_en }
= special_direction_en
  HAML
end

#render_special_direction_jaObject



28
29
30
# File 'lib/tokyo_metro/app/renderer/station_facility/platform/info/multiple_railway_lines/each_direction.rb', line 28

def render_special_direction_ja
  raise "Error: The method \'#{ __method__ }\' is not defined yet in this class."
end

#special_direction_enObject



38
39
40
# File 'lib/tokyo_metro/app/renderer/station_facility/platform/info/multiple_railway_lines/each_direction.rb', line 38

def special_direction_en
  raise "Error: The method \'#{ __method__ }\' is not defined yet in this class."
end