class Faker::Demographic
def demonym
-
(String)
-
def demonym fetch('demographic.demonym') end
def educational_attainment
-
(String)
-
def educational_attainment fetch('demographic.educational_attainment') end
def height(unit: :metric)
-
(String)
-
Parameters:
-
unit
(Symbol
) -- either `:metric` or `imperial`.
def height(unit: :metric) case unit when :imperial inches = rand_in_range(57, 86) "#{inches / 12} ft, #{inches % 12} in" when :metric rand_in_range(1.45, 2.13).round(2).to_s end end
def marital_status
-
(String)
-
def marital_status fetch('demographic.marital_status') end
def race
-
(String)
-
def race fetch('demographic.race') end
def sex
-
(String)
-
def sex fetch('demographic.sex') end