Class: Faker::Travel::Airport
Constant Summary
Constants inherited from Base
Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters
Class Method Summary collapse
-
.iata(size:, region:) ⇒ String
Produces random Airport by IATA code and takes arguments for size and region.
-
.name(size:, region:) ⇒ String
Produces random Airport by name and takes arguments for size and region.
Methods inherited from Base
bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, generate, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, shuffle!, translate, unique, with_locale
Class Method Details
.iata(size:, region:) ⇒ String
Produces random Airport by IATA code and takes arguments for size and region
Faker::Travel::Airport.iata(size: ‘large’, region: ‘united_states’) => “LAX”
37 38 39 |
# File 'lib/faker/travel/airport.rb', line 37 def iata(size:, region:) fetch("airport.#{region}.iata_code.#{size}") end |
.name(size:, region:) ⇒ String
Produces random Airport by name and takes arguments for size and region
Faker::Travel::Airport.name(size: ‘large’, region: ‘united_states’) => “Los Angeles International Airport”
20 21 22 |
# File 'lib/faker/travel/airport.rb', line 20 def name(size:, region:) fetch("airport.#{region}.#{size}") end |