Class: Faker::Indian::Vehicle
- Inherits:
-
Object
- Object
- Faker::Indian::Vehicle
- Defined in:
- lib/faker/indian/vehicle.rb
Constant Summary collapse
Class Method Summary collapse
Class Method Details
.registration_number(state: nil) ⇒ Object
12 13 14 |
# File 'lib/faker/indian/vehicle.rb', line 12 def registration_number(state: nil) "#{resolve_state_code(state)}#{rto_code}#{series}#{number}" end |
.rto_code ⇒ Object
20 21 22 |
# File 'lib/faker/indian/vehicle.rb', line 20 def rto_code format("%02d", random.rand(1..99)) end |
.state_code ⇒ Object
16 17 18 |
# File 'lib/faker/indian/vehicle.rb', line 16 def state_code STATE_CODES.sample(random: random) end |