Module: FFaker::NameIT
Constant Summary collapse
- PREFIX =
%w[Sig. Sig.ra Sig.na Dr. Dott. Dott.ssa Prof. Prof.ssa].freeze
Instance Method Summary collapse
- #first_name ⇒ Object
- #last_name ⇒ Object
- #name ⇒ Object
-
#prefix ⇒ Object
randomized? (ITALIAN) prefix!.
Methods included from ModuleUtils
const_missing, k, luhn_check, underscore, unique
Methods included from RandomUtils
#fetch_sample, #rand, #shuffle
Instance Method Details
#first_name ⇒ Object
20 21 22 |
# File 'lib/ffaker/name_it.rb', line 20 def first_name fetch_sample(FIRST_NAMES) end |
#last_name ⇒ Object
16 17 18 |
# File 'lib/ffaker/name_it.rb', line 16 def last_name fetch_sample(LAST_NAMES) end |
#name ⇒ Object
24 25 26 27 28 29 |
# File 'lib/ffaker/name_it.rb', line 24 def name case rand(0..9) when 5, 7 then "#{prefix} #{first_name} #{last_name}" else "#{first_name} #{last_name}" end end |
#prefix ⇒ Object
randomized? (ITALIAN) prefix!
12 13 14 |
# File 'lib/ffaker/name_it.rb', line 12 def prefix fetch_sample(PREFIX) end |