Class: Translink::Model::StopTime

Inherits:
Object
  • Object
show all
Includes:
DataMapper::Resource
Defined in:
lib/translink/model/stop_time.rb

Instance Method Summary collapse

Instance Method Details

#stop_time_page!(stop_time_page) ⇒ void

This method returns an undefined value.

Sets attributes from the stop_time_page.

Parameters:

  • stop_time_page (Page::Stop::StopTime)


20
21
22
23
24
# File 'lib/translink/model/stop_time.rb', line 20

def stop_time_page! stop_time_page
  self.arrival_time  = stop_time_page.arrival_time
  self.stop          = Stop.find_or_add_from_stop_page stop_time_page.stop_page
  self.stop_sequence = stop_time_page.stop_sequence
end