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, luhn_check, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Instance Method Details

#female_nameObject



23
24
25
# File 'lib/ffaker/name_ru.rb', line 23

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

#first_nameObject



15
16
17
# File 'lib/ffaker/name_ru.rb', line 15

def first_name
  fetch_sample(FIRST_NAMES)
end

#first_name_femaleObject



31
32
33
# File 'lib/ffaker/name_ru.rb', line 31

def first_name_female
  fetch_sample(FIRST_NAMES_FEMALE)
end

#first_name_maleObject



35
36
37
# File 'lib/ffaker/name_ru.rb', line 35

def first_name_male
  fetch_sample(FIRST_NAMES_MALE)
end

#last_nameObject



19
20
21
# File 'lib/ffaker/name_ru.rb', line 19

def last_name
  fetch_sample(LAST_NAMES)
end

#last_name_femaleObject



47
48
49
# File 'lib/ffaker/name_ru.rb', line 47

def last_name_female
  fetch_sample(LAST_NAMES_FEMALE)
end

#last_name_maleObject



51
52
53
# File 'lib/ffaker/name_ru.rb', line 51

def last_name_male
  fetch_sample(LAST_NAMES_MALE)
end

#male_nameObject



27
28
29
# File 'lib/ffaker/name_ru.rb', line 27

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

#middle_name_femaleObject



39
40
41
# File 'lib/ffaker/name_ru.rb', line 39

def middle_name_female
  fetch_sample(MIDDLE_NAMES_FEMALE)
end

#middle_name_maleObject



43
44
45
# File 'lib/ffaker/name_ru.rb', line 43

def middle_name_male
  fetch_sample(MIDDLE_NAMES_MALE)
end

#nameObject



11
12
13
# File 'lib/ffaker/name_ru.rb', line 11

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