Class: DoubleMap::Client::Stops
- Extended by:
- Memoist
- Defined in:
- lib/doublemap_api/client/stops.rb
Instance Method Summary collapse
-
#get(id) ⇒ Object
(also: #find)
Return the route whose id matches the given id.
-
#list ⇒ Object
(also: #all)
Return a list of all stops on the system.
Methods inherited from API
#get_request, include_api, #post_request, #refresh, require_all, singleton
Methods included from DoubleMap::Connection
#adapter, #connection, #register_adapter
Instance Method Details
#get(id) ⇒ Object Also known as: find
Return the route whose id matches the given id
13 14 15 |
# File 'lib/doublemap_api/client/stops.rb', line 13 def get id list.find{ |stop| stop.id == id } end |