Class: Synthra::Types::AddressLocation::AirportElevation
- Defined in:
- lib/synthra/types/address_location/airports.rb
Overview
AirportElevation type
Instance Method Summary collapse
- #generate_edge(rng, context, args) ⇒ Object
- #generate_invalid(rng, context, args) ⇒ Object
- #generate_random(rng, context, args) ⇒ Object
Instance Method Details
#generate_edge(rng, context, args) ⇒ Object
90 91 92 |
# File 'lib/synthra/types/address_location/airports.rb', line 90 def generate_edge(rng, context, args) [-100, 0, 15000].sample(random: rng.instance_variable_get(:@random)) end |
#generate_invalid(rng, context, args) ⇒ Object
94 95 96 |
# File 'lib/synthra/types/address_location/airports.rb', line 94 def generate_invalid(rng, context, args) [nil, "not a number", [], {}].sample(random: rng.instance_variable_get(:@random)) end |
#generate_random(rng, context, args) ⇒ Object
86 87 88 |
# File 'lib/synthra/types/address_location/airports.rb', line 86 def generate_random(rng, context, args) rng.int(-100, 15000) # Elevation in feet (some airports below sea level) end |