Module: OCTranspo
- Extended by:
- ServiceDate
- Defined in:
- lib/octranspo.rb,
lib/octranspo/stop.rb,
lib/octranspo/route.rb,
lib/octranspo/version.rb,
lib/octranspo/headsign.rb,
lib/octranspo/landmarks.rb,
lib/octranspo/service_date.rb,
lib/octranspo/stop_resource.rb,
lib/octranspo/mobile_route_data.rb,
lib/octranspo/mobile_stop_schedule.rb,
lib/octranspo/mobile_route_schedule.rb,
lib/octranspo/mobile_resource_methods.rb,
lib/octranspo/remote_resource_methods.rb
Defined Under Namespace
Modules: Headsign, Landmarks, MobileResourceMethods, MobileRouteData, MobileRouteSchedule, MobileStopSchedule, RemoteResourceMethods, Route, ServiceDate, Stop, StopResource
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
Methods included from ServiceDate
service_date, service_date_for
Class Method Details
.stop(options = {}) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/octranspo.rb', line 23 def stop (={}) case when [:number] OCTranspo::Stop.find_by_number([:number]) when [:name] OCTranspo::Stop.find_by_name([:name]) end end |
.stops(options = {}) ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/octranspo.rb', line 32 def stops (={}) case when [:name].is_a?(Regexp) OCTranspo::Stop.find_all_matching([:name]) when [:name] OCTranspo::Stop.find_all_by_name([:name]) end end |