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: "%td{ class: :order }<\n= \"\u9806\u4F4D\"\n  HAML\nend\n" , type: :haml

#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: "- if make_graph\n%td{ colspan: 2 , class: :passenger_journeys }<\n  = \"\u4E57\u964D\u5BA2\u6570\"\n- else\n%td{ class: :passenger_journeys }<\n  = \"\u4E57\u964D\u5BA2\u6570\"\n  HAML\nend\n" , type: :haml , locals: { make_graph: @make_graph }

#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: "%td{ class: :station }<\n= \"\u99C5\"\n  HAML\nend\n" , type: :haml

#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: "%td{ class: :survey_year }<\n%p<\n  = \"\u8ABF\u67FB\"\n%p<\n  = \"\u5E74\u5EA6\"\n  HAML\nend\n" , type: :haml