Sha256: eace11172abc3af63ceb865247f5b67b8bc635ecd84473ab67a0458bfed314bf
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
class TokyoMetro::App::Renderer::PassengerSurvey::Table::Station::Row < TokyoMetro::App::Renderer::PassengerSurvey::Table::MetaClass::Row def initialize( request , passenger_survey_info , n , max_passenger_journey_in_graph , make_graph , passenger_survey_infos_all ) super( request , passenger_survey_info , n , max_passenger_journey_in_graph , make_graph ) set_order( passenger_survey_infos_all ) end def render h.render inline: <<-HAML , type: :haml , locals: h_locals %tr{ class: [ :passenger_survey_table_row , cycle( :odd_row , :even_row ) ] , "data-href" => passenger_survey_info.station_page_name } - passenger_survey_info_decorated = passenger_survey_info.decorate = passenger_survey_info_decorated.render_station_name_in_table = passenger_survey_info_decorated.render_survey_year_in_table = passenger_survey_info_decorated.render_passenger_journeys = this.render_svg_domain_in_table = this.render_order HAML end def set_order( passenger_survey_infos_all) @order = passenger_survey_infos_all.where( 'survey_year = ? AND passenger_journeys > ?' , @passenger_survey_info.survey_year , @passenger_survey_info.passenger_journeys ).count + 1 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tokyo_metro-0.10.1 | lib/tokyo_metro/app/renderer/passenger_survey/table/station/row.rb |