Class: Faker::DnD

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

Class Method Summary collapse

Class Method Details

.alignmentObject



7
8
9
10
11
# File 'lib/faker_dnd.rb', line 7

def self.alignment
  order = ['lawful', 'neutral', 'chaotic']
  goodness = ['good', 'neutral', 'evil']
  alignment = order.sample + ' ' + goodness.sample
end

.classObject



3
4
5
# File 'lib/faker_dnd.rb', line 3

def self.class
  ['druid', 'cleric', 'fighter', 'magic user', 'thief', 'mystic'].sample
end

.raceObject



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

def self.race
  ['human', 'elf', 'dwarf', 'gnome', 'half-elf', 'half-orc', 'halfing'].sample
end