Class: Randamu::Vehicle

Inherits:
Base
  • Object
show all
Defined in:
lib/randamu/core/vehicle.rb

Class Method Summary collapse

Methods inherited from Base

load_data

Class Method Details

.brandObject



6
7
8
# File 'lib/randamu/core/vehicle.rb', line 6

def brand
  brands.keys.sample.capitalize
end

.car(brand: nil) ⇒ Object



10
11
12
# File 'lib/randamu/core/vehicle.rb', line 10

def car(brand: nil)
  vehicles_by_type(brand, 'cars')
end

.motorcycle(brand: nil) ⇒ Object



14
15
16
# File 'lib/randamu/core/vehicle.rb', line 14

def motorcycle(brand: nil)
  vehicles_by_type(brand, 'motorcycles')
end