Class: TokyoMetro::App::Renderer::PassengerSurvey::Table::MetaClass::Header
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
#render ⇒ Object
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
|
12
13
14
15
16
17
|
# File 'lib/tokyo_metro/app/renderer/passenger_survey/table/meta_class/header.rb', line 12
def
h.render inline: <<-HAML , type: :haml
%td{ class: :order }<
= "順位"
HAML
end
|
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
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
|
19
20
21
22
23
24
|
# File 'lib/tokyo_metro/app/renderer/passenger_survey/table/meta_class/header.rb', line 19
def
h.render inline: <<-HAML , type: :haml
%td{ class: :station }<
= "駅"
HAML
end
|
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
h.render inline: <<-HAML , type: :haml
%td{ class: :survey_year }<
%p<
= "調査"
%p<
= "年度"
HAML
end
|