Class: Translink::Model::Stop
- Inherits:
-
Object
- Object
- Translink::Model::Stop
- Includes:
- DataMapper::Resource
- Defined in:
- lib/translink/model/stop.rb
Class Method Summary collapse
-
.find_or_add_from_stop_page(stop_page) ⇒ Model::Stop
Stop model for the given
stop_page
.
Class Method Details
.find_or_add_from_stop_page(stop_page) ⇒ Model::Stop
Stop model for the given stop_page
. Will create the route if it doesn’t exist.
20 21 22 23 24 25 |
# File 'lib/translink/model/stop.rb', line 20 def self.find_or_add_from_stop_page stop_page first_or_create :id => stop_page.stop_id, :stop_name => stop_page.stop_name, :stop_lat => stop_page.stop_lat, :stop_lon => stop_page.stop_lon end |