module FFaker::Church

Constants

BODIES_OF_WATER
CHEESE_NAMES
CHURCH_TYPES
DENOMINATIONS
DESCRIPTORS
JOBS
LEVELS
NUMBERS

Public Instance Methods

job_title() click to toggle source
# File lib/church_faker/job_title.rb, line 6
def job_title
  case rand(3)
    when 0 then "#{level} #{descriptor} #{job}"
    when 1 then "#{descriptor} #{job}"
    when 2 then "#{level} #{job}"
  end
end
name() click to toggle source
# File lib/church_faker/name.rb, line 6
def name
  case rand(7)
    when 0 then "#{number} Church of #{city}"
    when 1 then "#{number} #{denomination} Church of #{city}"
    when 2 then "#{city} #{denomination}"
    when 3 then "#{city} #{church}"
    when 4 then "#{cheese_name}"
    when 5 then "#{city} #{denomination} #{church}"
    when 6 then "#{city_prefix} #{body_of_water} #{church}"
  end
end

Private Instance Methods

body_of_water() click to toggle source
# File lib/church_faker/name.rb, line 39
def body_of_water
  BODIES_OF_WATER.sample
end
cheese_name() click to toggle source
# File lib/church_faker/name.rb, line 31
def cheese_name
  CHEESE_NAMES.sample
end
church() click to toggle source
# File lib/church_faker/name.rb, line 43
def church
  case rand(2)
    when 0 then CHURCH_TYPES.sample
    when 1 then "Church"
  end
end
city() click to toggle source
# File lib/church_faker/name.rb, line 23
def city
  FFaker::Address.city
end
city_prefix() click to toggle source
# File lib/church_faker/name.rb, line 27
def city_prefix
  FFaker::Address.city_prefix
end
denomination() click to toggle source
# File lib/church_faker/name.rb, line 35
def denomination
  DENOMINATIONS.sample
end
descriptor() click to toggle source
# File lib/church_faker/job_title.rb, line 19
def descriptor
  DESCRIPTORS.sample
end
job() click to toggle source
# File lib/church_faker/job_title.rb, line 23
def job
  JOBS.sample
end
level() click to toggle source
# File lib/church_faker/job_title.rb, line 15
def level
  LEVELS.sample
end
number() click to toggle source
# File lib/church_faker/name.rb, line 19
def number
  NUMBERS.sample
end