Class: TokyoMetro::App::Renderer::FareTable::Group
- Inherits:
-
Factory::Decorate::MetaClass
- Object
- RailsDecorateFactory
- Factory::Decorate::MetaClass
- TokyoMetro::App::Renderer::FareTable::Group
- Defined in:
- lib/tokyo_metro/app/renderer/fare_table/group.rb
Instance Method Summary collapse
-
#initialize(request, station_info, railway_line_of_terminal_station) ⇒ Group
constructor
A new instance of Group.
- #render ⇒ Object
Constructor Details
#initialize(request, station_info, railway_line_of_terminal_station) ⇒ Group
Returns a new instance of Group.
3 4 5 6 7 8 |
# File 'lib/tokyo_metro/app/renderer/fare_table/group.rb', line 3 def initialize( request , station_info , railway_line_of_terminal_station ) super( request ) @normal_fare_groups = ::NormalFareGroup.all @station_info = station_info @railway_lines_of_terminal_station = [ railway_line_of_terminal_station ].flatten end |
Instance Method Details
#render ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/tokyo_metro/app/renderer/fare_table/group.rb', line 10 def render h.render inline: <<-HAML , type: :haml , locals: h_locals %div{ id: :fare_tables } - railway_lines_of_terminal_station.each do | railway_line | = ::TokyoMetro::App::Renderer::FareTable::ToEachRailwayLine.new( request , railway_line , station_infos_including_other_railway_lines , starting_station_info , fares , normal_fare_groups ).render HAML end |