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(legacy_unit = NOT_GIVEN, unit: :metric)
-
(String)-
Parameters:
-
unit(Symbol) -- either `:metric` or `imperial`.
def height(legacy_unit = NOT_GIVEN, unit: :metric) warn_for_deprecated_arguments do |keywords| keywords << :unit if legacy_unit != NOT_GIVEN end 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