Class: TokyoMetro::App::Renderer::PassengerSurvey::Table::RailwayLine::Header

Inherits:
MetaClass::Header show all
Defined in:
lib/tokyo_metro/app/renderer/passenger_survey/table/railway_line/header.rb

Instance Method Summary collapse

Methods inherited from MetaClass::Header

#render_header_of_passenger_journeys, #render_header_of_station, #render_header_of_year

Constructor Details

#initialize(reqeust, make_graph, railway_line) ⇒ Header

Returns a new instance of Header.



3
4
5
6
# File 'lib/tokyo_metro/app/renderer/passenger_survey/table/railway_line/header.rb', line 3

def initialize( reqeust , make_graph , railway_line )
  super( reqeust , make_graph )
  @railway_line = railway_line
end

Instance Method Details

#renderObject



8
9
10
11
12
13
14
15
16
# File 'lib/tokyo_metro/app/renderer/passenger_survey/table/railway_line/header.rb', line 8

def render
  h.render inline: <<-HAML , type: :haml , locals: h_locals
%thead{ id: :header_of_passenger_survey_table }
= this.render_header_of_order
= this.render_header_of_station
= this.render_header_of_year
= this.render_header_of_passenger_journeys
  HAML
end

#render_header_of_orderObject



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/tokyo_metro/app/renderer/passenger_survey/table/railway_line/header.rb', line 18

def render_header_of_order
  h.render inline: <<-HAML , type: :haml , locals: { railway_line: @railway_line }
%td{ class: :order , colspan: 2 }<
%p<
  = "順位"
%p{ class: :small }<
  = "左:" + railway_line.name_ja
%p{ class: :small }<
  = "右:全路線"
  HAML
end