Class: Faker::Games::DnD
Constant Summary
Constants inherited from Base
Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters
Class Method Summary collapse
-
.alignment ⇒ String
Produces the name of an alignment from Dungeons and Dragons.
-
.background ⇒ String
Produces the name of a background from Dungeons and Dragons (PHB).
-
.city ⇒ String
Produces the name of a city from Dungeons and Dragons.
-
.first_name ⇒ String
Produces the first name of a character or monster from Dungeons and Dragons.
-
.klass ⇒ String
Produces the name of a class from Dungeons and Dragons (PHB).
-
.language ⇒ String
Produces the name of a language from Dungeons and Dragons.
-
.last_name ⇒ String
Produces a last name from Dungeons and Dragons.
-
.melee_weapon ⇒ String
Produces the name of a melee weapon from Dungeons and Dragons.
-
.monster ⇒ String
Produces the name of a monster from Dungeons and Dragons.
-
.name ⇒ String
Produces a full name from Dungeons and Dragons.
-
.race ⇒ String
Produces the name of a race from Dungeons and Dragons (PHB).
-
.ranged_weapon ⇒ String
Produces the name of a ranged weapon from Dungeons and Dragons.
-
.title_name ⇒ String
Produces a last name from Dungeons and Dragons.
Methods inherited from Base
bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, generate, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, shuffle!, translate, unique, with_locale
Class Method Details
.alignment ⇒ String
Produces the name of an alignment from Dungeons and Dragons.
16 17 18 |
# File 'lib/faker/games/dnd.rb', line 16 def alignment fetch('dnd.alignments') end |
.background ⇒ String
Produces the name of a background from Dungeons and Dragons (PHB).
29 30 31 |
# File 'lib/faker/games/dnd.rb', line 29 def background fetch('dnd.backgrounds') end |
.city ⇒ String
Produces the name of a city from Dungeons and Dragons.
42 43 44 |
# File 'lib/faker/games/dnd.rb', line 42 def city fetch('dnd.cities') end |
.first_name ⇒ String
Produces the first name of a character or monster from Dungeons and Dragons.
55 56 57 |
# File 'lib/faker/games/dnd.rb', line 55 def first_name fetch('dnd.name.first_name') end |
.klass ⇒ String
Produces the name of a class from Dungeons and Dragons (PHB).
68 69 70 |
# File 'lib/faker/games/dnd.rb', line 68 def klass fetch('dnd.klasses') end |
.language ⇒ String
Produces the name of a language from Dungeons and Dragons.
81 82 83 |
# File 'lib/faker/games/dnd.rb', line 81 def language fetch('dnd.languages') end |
.last_name ⇒ String
Produces a last name from Dungeons and Dragons.
94 95 96 |
# File 'lib/faker/games/dnd.rb', line 94 def last_name fetch('dnd.name.last_name') end |
.melee_weapon ⇒ String
Produces the name of a melee weapon from Dungeons and Dragons.
107 108 109 |
# File 'lib/faker/games/dnd.rb', line 107 def melee_weapon fetch('dnd.melee_weapons') end |
.monster ⇒ String
Produces the name of a monster from Dungeons and Dragons.
120 121 122 |
# File 'lib/faker/games/dnd.rb', line 120 def monster fetch('dnd.monsters') end |
.name ⇒ String
Produces a full name from Dungeons and Dragons.
133 134 135 |
# File 'lib/faker/games/dnd.rb', line 133 def name "#{fetch('dnd.name.first_name')} #{fetch('dnd.name.last_name')}" end |
.race ⇒ String
Produces the name of a race from Dungeons and Dragons (PHB).
146 147 148 |
# File 'lib/faker/games/dnd.rb', line 146 def race fetch('dnd.races') end |
.ranged_weapon ⇒ String
Produces the name of a ranged weapon from Dungeons and Dragons.
159 160 161 |
# File 'lib/faker/games/dnd.rb', line 159 def ranged_weapon fetch('dnd.ranged_weapons') end |
.title_name ⇒ String
Produces a last name from Dungeons and Dragons.
172 173 174 |
# File 'lib/faker/games/dnd.rb', line 172 def title_name "#{fetch('dnd.name.first_name')} #{fetch('dnd.name.title')}" end |