Class: Randamu::Person

Inherits:
Base
  • Object
show all
Extended by:
NameGenerator
Defined in:
lib/randamu/core/person.rb

Constant Summary

Constants included from NameGenerator

NameGenerator::GENDER

Class Method Summary collapse

Methods included from NameGenerator

first_name, full_name, last_name

Methods inherited from Base

load_data

Class Method Details

.blood_typeObject



12
13
14
# File 'lib/randamu/core/person.rb', line 12

def blood_type
  load_data('people.blood_types').sample
end

.genderObject



16
17
18
# File 'lib/randamu/core/person.rb', line 16

def gender
  load_data('people.genders').sample
end

.marital_statusObject



20
21
22
# File 'lib/randamu/core/person.rb', line 20

def marital_status
  load_data('people.marital_status').sample
end

.professionObject



8
9
10
# File 'lib/randamu/core/person.rb', line 8

def profession
  load_data('academic.professions').sample
end

.religion(adjective: true) ⇒ Object



24
25
26
27
28
# File 'lib/randamu/core/person.rb', line 24

def religion(adjective: true)
  return load_data('people.religions_adjectives').sample if adjective

  load_data('people.religions').sample
end