Module: Dummy::Name
Instance Method Summary collapse
Instance Method Details
#first_name ⇒ Object
13 14 15 |
# File 'lib/dummy/name.rb', line 13 def first_name FIRST_NAMES.rand end |
#last_name ⇒ Object
17 18 19 |
# File 'lib/dummy/name.rb', line 17 def last_name LAST_NAMES.rand end |
#name ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/dummy/name.rb', line 5 def name case rand(10) when 0 then "#{prefix} #{first_name} #{last_name}" when 1 then "#{first_name} #{last_name} #{suffix}" else "#{first_name} #{last_name}" end end |