class DoubleMap::Client::Stops

Public Instance Methods

all()
Alias for: list
find(id)
Alias for: get
get(id) click to toggle source

Return the route whose id matches the given id

# File lib/doublemap_api/client/stops.rb, line 13
def get id
  list.find{ |stop| stop.id == id }
end
Also aliased as: find
list() click to toggle source

Return a list of all stops on the system.

# File lib/doublemap_api/client/stops.rb, line 6
def list
  get_request('/map/v2/stops').map{ |stop| Stop.new(stop) }.each(&on_stop)
end
Also aliased as: all

Private Instance Methods

on_stop() click to toggle source
# File lib/doublemap_api/client/stops.rb, line 21
def on_stop
  DoubleMap.configuration.on_stop
end