Class: TokyoMetro::App::Renderer::PassengerSurvey::SideMenu::MetaClass

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

Direct Known Subclasses

Index, RailwayLine, Station, Year

Defined Under Namespace

Classes: EachYear

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ MetaClass

Returns a new instance of MetaClass.



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

def initialize( request )
  super( request )
  @all_railway_lines = ::RailwayLine.tokyo_metro( including_branch_line: false )
  @survey_years = ::PassengerSurvey.all.pluck( :survey_year ).uniq.sort
end

Instance Method Details

#renderObject



9
10
11
12
13
14
15
16
# File 'lib/tokyo_metro/app/renderer/passenger_survey/side_menu/meta_class.rb', line 9

def render
  h.render inline: <<-HAML , type: :haml , locals: h_locals
%ul{ id: ul_class , class: [ :links , :clearfix ] }
= proc_for_links_to_railway_line_pages.call
= proc_for_links_to_year_pages.call
- # = proc_for_links_to_station_pages.call
  HAML
end