Sha256: 1a46b7649b7007c60195ff5977f08d26e22e9cfef401b40ceb9dc7dfb83e1a53

Contents?: true

Size: 1.45 KB

Versions: 1

Compression:

Stored size: 1.45 KB

Contents

class TokyoMetro::App::Renderer::StationFacility::Platform::Info::MultipleRailwayLines::EachDirection < TokyoMetro::App::Renderer::StationFacility::Platform::Info::MetaClass::EachDirection

  include ::TokyoMetro::App::Renderer::StationFacility::Platform::Info::MultipleRailwayLines::Common

  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

  def of_special_direction?
    false
  end

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

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

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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tokyo_metro-0.10.1 lib/tokyo_metro/app/renderer/station_facility/platform/info/multiple_railway_lines/each_direction.rb