class Faker::Games::DnD

Public Class Methods

alignment() click to toggle source

Produces the name of an alignment from Dungeons and Dragons.

@return [String]

@example

Faker::Games::DnD.alignment #=> "Lawful Neutral"

@faker.version 2.13.0

# File lib/faker/games/dnd.rb, line 16
def alignment
  fetch('dnd.alignments')
end
background() click to toggle source

Produces the name of a background from Dungeons and Dragons (PHB).

@return [String]

@example

Faker::Games::DnD.background #=> "Urchin"

@faker.version 2.13.0

# File lib/faker/games/dnd.rb, line 29
def background
  fetch('dnd.backgrounds')
end
city() click to toggle source

Produces the name of a city from Dungeons and Dragons.

@return [String]

@example

Faker::Games::DnD.city #=> "Earthfast"

@faker.version 2.14.0

# File lib/faker/games/dnd.rb, line 42
def city
  fetch('dnd.cities')
end
first_name() click to toggle source

Produces the first name of a character or monster from Dungeons and Dragons.

@return [String]

@example

Faker::Games::DnD.name #=> "Eilonwy"

@faker.version next

# File lib/faker/games/dnd.rb, line 55
def first_name
  fetch('dnd.name.first_name')
end
klass() click to toggle source

Produces the name of a class from Dungeons and Dragons (PHB).

@return [String]

@example

Faker::Games::DnD.klass #=> "Warlock"

@faker.version 2.13.0

# File lib/faker/games/dnd.rb, line 68
def klass
  fetch('dnd.klasses')
end
language() click to toggle source

Produces the name of a language from Dungeons and Dragons.

@return [String]

@example

Faker::Games::DnD.language #=> "Gnomish"

@faker.version 2.14.0

# File lib/faker/games/dnd.rb, line 81
def language
  fetch('dnd.languages')
end
last_name() click to toggle source

Produces a last name from Dungeons and Dragons.

@return [String]

@example

Faker::Games::DnD.last_name #=> "Leafwhisper"

@faker.version next

# File lib/faker/games/dnd.rb, line 94
def last_name
  fetch('dnd.name.last_name')
end
melee_weapon() click to toggle source

Produces the name of a melee weapon from Dungeons and Dragons.

@return [String]

@example

Faker::Games::DnD.melee_weapon #=> "Handaxe"

@faker.version 2.14.0

# File lib/faker/games/dnd.rb, line 107
def melee_weapon
  fetch('dnd.melee_weapons')
end
monster() click to toggle source

Produces the name of a monster from Dungeons and Dragons.

@return [String]

@example

Faker::Games::DnD.monster #=> "Manticore"

@faker.version 2.14.0

# File lib/faker/games/dnd.rb, line 120
def monster
  fetch('dnd.monsters')
end
name() click to toggle source

Produces a full name from Dungeons and Dragons.

@return [String]

@example

Faker::Games::DnD.name #=> "Drakon Blackthorn"

@faker.version next

# File lib/faker/games/dnd.rb, line 133
def name
  "#{fetch('dnd.name.first_name')} #{fetch('dnd.name.last_name')}"
end
race() click to toggle source

Produces the name of a race from Dungeons and Dragons (PHB).

@return [String]

@example

Faker::Games::DnD.races #=> "Dwarf"

@faker.version 2.14.0

# File lib/faker/games/dnd.rb, line 146
def race
  fetch('dnd.races')
end
ranged_weapon() click to toggle source

Produces the name of a ranged weapon from Dungeons and Dragons.

@return [String]

@example

Faker::Games::DnD.ranged_weapon #=> "Shortbow"

@faker.version 2.14.0

# File lib/faker/games/dnd.rb, line 159
def ranged_weapon
  fetch('dnd.ranged_weapons')
end
title_name() click to toggle source

Produces a last name from Dungeons and Dragons.

@return [String]

@example

Faker::Games::DnD.title_name #=> "Corvus the Cunning"

@faker.version next

# File lib/faker/games/dnd.rb, line 172
def title_name
  "#{fetch('dnd.name.first_name')} #{fetch('dnd.name.title')}"
end