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

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

Direct Known Subclasses

RailwayLine, Station, Year

Defined Under Namespace

Classes: Header, Row

Instance Method Summary collapse

Constructor Details

#initialize(request, passenger_survey_infos, make_graph) ⇒ MetaClass

Returns a new instance of MetaClass.



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

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

  set_max_passenger_journey_in_graph
end

Instance Method Details

#renderObject



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

def render
  h.render inline: <<-HAML , type: :haml , locals: h_locals
%div{ id: :passenger_survey_table , class: css_class_name_of_tables }
%table{ class: [ :table , "table-striped" ] }
  = this.render_header_of_table
  - rows.each do | row |
    = row.render
  HAML
end

#render_header_of_tableObject



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

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