module FFaker::EducationCN
Constants
- DEGREE_PREFIX
- DEGREE_SUFFIX
- POSITION
- SCHOOL_UNI
Public Instance Methods
degree()
click to toggle source
# File lib/ffaker/education_cn.rb, line 13 def degree "#{fetch_sample(DEGREE_PREFIX)}#{fetch_sample(DEGREE_SUFFIX)}" end
location()
click to toggle source
# File lib/ffaker/education_cn.rb, line 21 def location case rand(0..2) when 0 then fetch_sample(PROVINCE) when 1 then fetch_sample(CITY) when 2 then fetch_sample(POSITION) end end
major()
click to toggle source
# File lib/ffaker/education_cn.rb, line 17 def major fetch_sample(MAJOR) end
school()
click to toggle source
# File lib/ffaker/education_cn.rb, line 29 def school case rand(0..2) when 0 then "#{location}#{fetch_sample(SCHOOL_TYPE)}#{fetch_sample(SCHOOL_UNI)}" when 1 then "#{location}#{fetch_sample(SCHOOL_UNI)}" when 2 then "#{location}#{fetch_sample(SCHOOL_TYPE)}#{fetch_sample(SCHOOL_UNI)}#{fetch_sample(CITY)}分校" end end