Method: Faker::Address#city

Defined in:
lib/ffakerer/address.rb

#cityObject



33
34
35
36
37
38
39
40
# File 'lib/ffakerer/address.rb', line 33

def city
  case rand(4)
  when 0 then '%s %s%s' % [city_prefix, Name.first_name, city_suffix]
  when 1 then '%s %s'   % [city_prefix, Name.first_name]
  when 2 then '%s%s'    % [Name.first_name, city_suffix]
  when 3 then '%s%s'    % [Name.last_name, city_suffix]
  end
end