Class: FipExtractor::Converter::VehicleType

Inherits:
Object
  • Object
show all
Defined in:
lib/fipextractor/converter/vehicle_type.rb

Constant Summary collapse

REMOTE_TYPE =
{
  car: 1,
  motorcycle: 2,
  truck: 3,
}

Class Method Summary collapse

Class Method Details

.to_id(type) ⇒ Object



10
11
12
13
# File 'lib/fipextractor/converter/vehicle_type.rb', line 10

def self.to_id(type)
  return type if type.is_a?(Integer)
  REMOTE_TYPE[type]
end