Class: Imposter::Street
- Inherits:
-
Object
- Object
- Imposter::Street
- Defined in:
- lib/imposter/csz.rb
Constant Summary collapse
- Names =
%w(1st First 2nd 3rd Third 4th Fourth 5th Fifth 6th Sixth 7th Seventh 8th Eighth 9th Nineth 10th Tenth Maple Kennedy Central Elm Washngton State Country Acres Douglas Laurel Jefferson Wall Street Main Roosevelt Walnut Tyler Hickory Market Broadway Forest Park Birch Spruce Taylor Beech Oak Sycamore Wood Grant Lincoln Taft Poplar)
- Types =
%w(Highway Hwy Expressway Expy Freeway Fwy Motorway Mtrwy Avenue Ave Boulevard Blvd Road Rd Street St Alley Aly Bay Drive Dr Fairway Gardens Gdns Gate Grove Grv Heights Hts Highlands Knoll Knl Lane Ln Manor Mnr Mews Passage Psge Pathway Pthwy Place Pl Row Terrace Ter Trail Trl View Vw Way Close Court Ct Cove Cv Croft Garth Green Grn Lawn Nook Place Pl Circle Cir Crescent Cres Loop Oval Quadrant Square Sq Canyon Cyn Causeway Cswy Grade Hill Hl Mount Mt Parkway Pkwy Rise Vale)
- Directions =
%w(N. S. E. W. NE. NW. SE. SW.)
Class Method Summary collapse
Class Method Details
.direction ⇒ Object
56 57 58 |
# File 'lib/imposter/csz.rb', line 56 def direction Directions.shuffle[0,1] end |
.full ⇒ Object
60 61 62 63 64 65 66 67 |
# File 'lib/imposter/csz.rb', line 60 def full st_num = (100+rand(99999)) rnd_addr = st_num.to_s+(['_']+name + ['_'] + type).to_s if (1+rand(5))<2 then rnd_addr += (['_']+direction).to_s.upcase end return rnd_addr.titleize end |
.name ⇒ Object
48 49 50 |
# File 'lib/imposter/csz.rb', line 48 def name Names.shuffle[0,1] end |
.type ⇒ Object
52 53 54 |
# File 'lib/imposter/csz.rb', line 52 def type return_type=Types.shuffle[0,1] end |