class DoubleMap::Client::Routes

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/routes.rb, line 13
def get id
  list.find{ |route| route.id == id }
end
Also aliased as: find
list() click to toggle source

Return a list of all routes on the system.

# File lib/doublemap_api/client/routes.rb, line 6
def list
  get_request('/map/v2/routes').map{ |route| Route.new(route) }.each(&on_route)
end
Also aliased as: all

Private Instance Methods

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