module Faker::Education

Constants

DEGREE_PREFIX
DEGREE_SHORT_PREFIX
MAJOR_ADJ
SCHOOL_ADJ
SCHOOL_PREFIX
SCHOOL_TYPE
SCHOOL_UNI

Public Instance Methods

degree() click to toggle source
# File lib/ffakerer/education.rb, line 12
def degree
  "#{DEGREE_PREFIX.rand} in #{major}"
end
degree_short() click to toggle source
# File lib/ffakerer/education.rb, line 8
def degree_short
  "#{DEGREE_SHORT_PREFIX.rand} in #{major}"
end
major() click to toggle source
# File lib/ffakerer/education.rb, line 16
def major
  "#{MAJOR_ADJ.rand} #{MAJOR_NOUN.rand}"
end
school() click to toggle source
# File lib/ffakerer/education.rb, line 31
def school
  case rand(5)
  when (0..1)  then "#{school_name} #{SCHOOL_TYPE.rand}"
  when 2 then "#{school_generic_name} #{SCHOOL_ADJ.rand} #{SCHOOL_TYPE.rand}"
  when 3 then "#{SCHOOL_UNI.rand} of #{school_generic_name}"
  when 4 then "#{school_generic_name} #{SCHOOL_TYPE.rand} of #{MAJOR_NOUN.rand}"
  end
end
school_generic_name() click to toggle source
# File lib/ffakerer/education.rb, line 24
def school_generic_name
  case rand(2)
  when 0 then AddressUS::STATE.rand
  when 1 then school_name
  end
end
school_name() click to toggle source
# File lib/ffakerer/education.rb, line 20
def school_name
  SCHOOL_PREFIX.rand + SCHOOL_SUFFIX.rand
end