Module: FFaker::NameRU

Extended by:
ModuleUtils, NameRU
Included in:
NameRU
Defined in:
lib/ffaker/name_ru.rb

Constant Summary collapse

FIRST_NAMES =
FIRST_NAMES_MALE + FIRST_NAMES_FEMALE
LAST_NAMES =
LAST_NAMES_MALE + LAST_NAMES_FEMALE

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Instance Method Details

#female_nameObject


25
26
27
# File 'lib/ffaker/name_ru.rb', line 25

def female_name
  "#{first_name_female} #{last_name_female}"
end

#first_nameObject


17
18
19
# File 'lib/ffaker/name_ru.rb', line 17

def first_name
  fetch_sample(FIRST_NAMES)
end

#first_name_femaleObject


33
34
35
# File 'lib/ffaker/name_ru.rb', line 33

def first_name_female
  fetch_sample(FIRST_NAMES_FEMALE)
end

#first_name_maleObject


37
38
39
# File 'lib/ffaker/name_ru.rb', line 37

def first_name_male
  fetch_sample(FIRST_NAMES_MALE)
end

#last_nameObject


21
22
23
# File 'lib/ffaker/name_ru.rb', line 21

def last_name
  fetch_sample(LAST_NAMES)
end

#last_name_femaleObject


49
50
51
# File 'lib/ffaker/name_ru.rb', line 49

def last_name_female
  fetch_sample(LAST_NAMES_FEMALE)
end

#last_name_maleObject


53
54
55
# File 'lib/ffaker/name_ru.rb', line 53

def last_name_male
  fetch_sample(LAST_NAMES_MALE)
end

#male_nameObject


29
30
31
# File 'lib/ffaker/name_ru.rb', line 29

def male_name
  "#{first_name_male} #{last_name_male}"
end

#middle_name_femaleObject


41
42
43
# File 'lib/ffaker/name_ru.rb', line 41

def middle_name_female
  fetch_sample(MIDDLE_NAMES_FEMALE)
end

#middle_name_maleObject


45
46
47
# File 'lib/ffaker/name_ru.rb', line 45

def middle_name_male
  fetch_sample(MIDDLE_NAMES_MALE)
end

#nameObject


13
14
15
# File 'lib/ffaker/name_ru.rb', line 13

def name
  rand(0..1).zero? ? female_name : male_name
end