Module: Inthegra::Client::Vehicles
- Included in:
- Inthegra::Client
- Defined in:
- lib/inthegra/client/vehicles.rb
Overview
Define methods related to vehicles
Instance Method Summary collapse
-
#vehicles ⇒ Array::Vehicle
Return a list of all vehicles.
-
#vehicles_by_line(line_code) ⇒ Array::Vehicle
Return a list of all vehicles of from a line code.
Instance Method Details
#vehicles ⇒ Array::Vehicle
Return a list of all vehicles
13 14 15 16 17 |
# File 'lib/inthegra/client/vehicles.rb', line 13 def vehicles response = get('veiculos') VehiclesSerializer.parse(response, Vehicle) end |
#vehicles_by_line(line_code) ⇒ Array::Vehicle
Return a list of all vehicles of from a line code
27 28 29 30 31 |
# File 'lib/inthegra/client/vehicles.rb', line 27 def vehicles_by_line(line_code) response = get('veiculosLinha', { busca: URI::encode(line_code) }) VehiclesSerializer.parse([response], Vehicle) end |