Class: TokyoMetro::App::Renderer::Concerns::Link::ToRailwayLinePage::PassengerSurvey
- Inherits:
-
MetaClass::Group
- Object
- RailsDecorateFactory
- Factory::Decorate::MetaClass
- MetaClass
- MetaClass::Group
- TokyoMetro::App::Renderer::Concerns::Link::ToRailwayLinePage::PassengerSurvey
- Defined in:
- lib/tokyo_metro/app/renderer/concerns/link/to_railway_line_page/passenger_survey.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(request, railway_line_decorated, survey_years, additional_class_of_li: nil) ⇒ PassengerSurvey
constructor
A new instance of PassengerSurvey.
- #render ⇒ Object
Methods inherited from MetaClass::Group
Constructor Details
#initialize(request, railway_line_decorated, survey_years, additional_class_of_li: nil) ⇒ PassengerSurvey
Returns a new instance of PassengerSurvey.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/tokyo_metro/app/renderer/concerns/link/to_railway_line_page/passenger_survey.rb', line 3 def initialize( request , railway_line_decorated , survey_years , additional_class_of_li: nil ) super( request , railway_line_decorated ) @controller = :passenger_survey @link_type = :action_for_station @suffix_ja = "の各駅" @prefix_en = "Stations on" @survey_years = survey_years.sort.reverse @additional_class_of_li = additional_class_of_li end |
Instance Method Details
#render ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/tokyo_metro/app/renderer/concerns/link/to_railway_line_page/passenger_survey.rb', line 16 def render h.render inline: <<-HAML , type: :haml , locals: h_locals %ul{ class: [ :each_railway_line , railway_line_decorated.css_class_name , :clearfix ] } = this.render_railway_line_name - survey_year_max = survey_years.max - survey_years.each do | survey_year | = ::TokyoMetro::App::Renderer::PassengerSurvey::SideMenu::MetaClass::EachYear.new( request , survey_year , survey_year_max , railway_line_page_name ).render HAML end |