Class: AZEROTHFaker::Character

Inherits:
Object
  • Object
show all
Defined in:
lib/azeroth_faker/character.rb

Class Method Summary collapse

Class Method Details

.first_nameObject



13
14
15
16
# File 'lib/azeroth_faker/character.rb', line 13

def self.first_name
  @name = @names.sample.split
  return name[0]
end

.last_nameObject



18
19
20
21
22
23
24
# File 'lib/azeroth_faker/character.rb', line 18

def self.last_name
  name = @names.sample.split
  while name.length < 1
    name = @names.sample
  end
  return name[-1]
end

.random_nameObject



9
10
11
# File 'lib/azeroth_faker/character.rb', line 9

def self.random_name
  @names.sample
end