class Transilien::StopPoint
Public Instance Methods
address()
click to toggle source
# File lib/transilien/stop_point.rb, line 6 def address payload.at('StopPointAddress') end
Also aliased as: stop_point_address
city()
click to toggle source
# File lib/transilien/stop_point.rb, line 26 def city @city ||= Transilien::City.from_node(payload.at('City'), access_time) end
coord()
click to toggle source
# File lib/transilien/stop_point.rb, line 35 def coord @coord ||= { x: payload.at('Coord').at('CoordX').content.sub(',','.').to_f, y: payload.at('Coord').at('CoordY').content.sub(',','.').to_f } end
equipment()
click to toggle source
# File lib/transilien/stop_point.rb, line 11 def equipment @equipment ||= { sheltered: (payload.at('Equipment')['Sheltered'] == 'True'), mimp_access: (payload.at('Equipment')['MIPAccess'] == 'True'), elevator: (payload.at('Equipment')['Elevator'] == 'True'), escalator: (payload.at('Equipment')['Escalator'] == 'True'), bike_accepted: (payload.at('Equipment')['BikeAccepted'] == 'True'), bike_depot: (payload.at('Equipment')['BikeDepot'] == 'True') } end
fare_zone()
click to toggle source
# File lib/transilien/stop_point.rb, line 2 def fare_zone @fare_zone ||= payload['FareZone'] end
mode()
click to toggle source
# File lib/transilien/stop_point.rb, line 22 def mode @mode ||= Transilien::Mode.from_node(payload.at('Mode'), access_time) end
stop_area()
click to toggle source
# File lib/transilien/stop_point.rb, line 30 def stop_area #@stop_area ||= Transilien::StopArea.from_node(payload.at('StopArea'), access_time) @stop_area ||= Transilien::StopArea.find(stop_area_external_code: payload.at('StopArea')['StopAreaExternalCode']).first end