Class: TokyoMetro::App::Renderer::FareTable::ToEachRailwayLine::Rows
- Inherits:
-
Factory::Decorate::MetaClass
- Object
- RailsDecorateFactory
- Factory::Decorate::MetaClass
- TokyoMetro::App::Renderer::FareTable::ToEachRailwayLine::Rows
- Defined in:
- lib/tokyo_metro/app/renderer/fare_table/to_each_railway_line/rows.rb
Instance Method Summary collapse
-
#initialize(request, station_infos, fares, normal_fare_groups, to_make_empty_row_when_no_station: false) ⇒ Rows
constructor
A new instance of Rows.
- #render ⇒ Object
Constructor Details
#initialize(request, station_infos, fares, normal_fare_groups, to_make_empty_row_when_no_station: false) ⇒ Rows
Returns a new instance of Rows.
3 4 5 6 7 8 9 |
# File 'lib/tokyo_metro/app/renderer/fare_table/to_each_railway_line/rows.rb', line 3 def initialize( request , station_infos , fares , normal_fare_groups , to_make_empty_row_when_no_station: false ) super( request ) @station_infos = station_infos @fares = fares @normal_fare_groups = normal_fare_groups @to_make_empty_row_when_no_station = to_make_empty_row_when_no_station end |
Instance Method Details
#render ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/tokyo_metro/app/renderer/fare_table/to_each_railway_line/rows.rb', line 11 def render if @station_infos.blank? and @to_make_empty_row_when_no_station render_empty_row_when_no_station elsif @station_infos.present? render_normal_rows end end |