Class: Imposter::Street

Inherits:
Object
  • Object
show all
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

.directionObject



55
56
57
# File 'lib/imposter/csz.rb', line 55

def direction
	Directions.shuffle[0,1]
end

.fullObject



59
60
61
62
63
64
65
66
# File 'lib/imposter/csz.rb', line 59

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

.nameObject



47
48
49
# File 'lib/imposter/csz.rb', line 47

def name
	Names.shuffle[0,1]
end

.typeObject



51
52
53
# File 'lib/imposter/csz.rb', line 51

def type
	return_type=Types.shuffle[0,1]
end