Sha256: b578c39a0553f9d40b9b2f6153818d0b108b7ecd421618422b3ae55976e2665d

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

class TokyoMetro::App::Renderer::PassengerSurvey::Table::MetaClass::Header < TokyoMetro::Factory::Decorate::MetaClass

  def initialize( request , make_graph )
    super( request )
    @make_graph = make_graph
  end

  def render
    raise "Error: This method \'#{ __method__ }\' is not defined in this class \'#{ self.class.name }\'."
  end

  def render_header_of_order
    h.render inline: <<-HAML , type: :haml
%td{ class: :order }<
  = "順位"
    HAML
  end

  def render_header_of_station
    h.render inline: <<-HAML , type: :haml
%td{ class: :station }<
  = "駅"
    HAML
  end

  def render_header_of_year
    h.render inline: <<-HAML , type: :haml
%td{ class: :survey_year }<
  %p<
    = "調査"
  %p<
    = "年度"
    HAML
  end

  def render_header_of_passenger_journeys
    h.render inline: <<-HAML , type: :haml , locals: { make_graph: @make_graph }
- if make_graph
  %td{ colspan: 2 , class: :passenger_journeys }<
    = "乗降客数"
- else
  %td{ class: :passenger_journeys }<
    = "乗降客数"
    HAML
  end

  private

  def h_locals
    super.merge({
      this: self
    })
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tokyo_metro-0.10.1 lib/tokyo_metro/app/renderer/passenger_survey/table/meta_class/header.rb