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

Inherits:
Factory::Decorate::MetaClass show all
Defined in:
lib/tokyo_metro/app/renderer/passenger_survey/table/meta_class/header.rb

Instance Method Summary collapse

Constructor Details

#initialize(request, make_graph) ⇒ Header

Returns a new instance of Header.



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

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

Instance Method Details

#renderObject



8
9
10
# File 'lib/tokyo_metro/app/renderer/passenger_survey/table/meta_class/header.rb', line 8

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

#render_header_of_orderObject



12
13
14
15
16
17
# File 'lib/tokyo_metro/app/renderer/passenger_survey/table/meta_class/header.rb', line 12

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

#render_header_of_passenger_journeysObject



36
37
38
39
40
41
42
43
44
45
# File 'lib/tokyo_metro/app/renderer/passenger_survey/table/meta_class/header.rb', line 36

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

#render_header_of_stationObject



19
20
21
22
23
24
# File 'lib/tokyo_metro/app/renderer/passenger_survey/table/meta_class/header.rb', line 19

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

#render_header_of_yearObject



26
27
28
29
30
31
32
33
34
# File 'lib/tokyo_metro/app/renderer/passenger_survey/table/meta_class/header.rb', line 26

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