faker 2.2.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +131 -15
  3. data/README.md +2 -2
  4. data/lib/faker.rb +34 -0
  5. data/lib/faker/blockchain/aeternity.rb +70 -0
  6. data/lib/faker/blockchain/bitcoin.rb +26 -0
  7. data/lib/faker/blockchain/ethereum.rb +10 -0
  8. data/lib/faker/blockchain/tezos.rb +62 -6
  9. data/lib/faker/books/book.rb +36 -0
  10. data/lib/faker/books/culture_series.rb +49 -0
  11. data/lib/faker/books/dune.rb +60 -9
  12. data/lib/faker/books/lovecraft.rb +189 -33
  13. data/lib/faker/creature/animal.rb +9 -0
  14. data/lib/faker/creature/cat.rb +27 -0
  15. data/lib/faker/creature/dog.rb +72 -0
  16. data/lib/faker/creature/horse.rb +18 -0
  17. data/lib/faker/default/address.rb +10 -15
  18. data/lib/faker/default/alphanumeric.rb +29 -18
  19. data/lib/faker/default/app.rb +50 -11
  20. data/lib/faker/default/appliance.rb +18 -0
  21. data/lib/faker/default/artist.rb +9 -0
  22. data/lib/faker/default/avatar.rb +38 -19
  23. data/lib/faker/default/bank.rb +4 -6
  24. data/lib/faker/default/boolean.rb +14 -4
  25. data/lib/faker/default/chile_rut.rb +6 -14
  26. data/lib/faker/default/chuck_norris.rb +1 -1
  27. data/lib/faker/default/code.rb +7 -13
  28. data/lib/faker/default/commerce.rb +8 -17
  29. data/lib/faker/default/company.rb +4 -6
  30. data/lib/faker/default/crypto_coin.rb +6 -9
  31. data/lib/faker/default/date.rb +76 -30
  32. data/lib/faker/default/demographic.rb +2 -3
  33. data/lib/faker/default/dessert.rb +27 -0
  34. data/lib/faker/default/device.rb +54 -0
  35. data/lib/faker/default/driving_licence.rb +5 -15
  36. data/lib/faker/default/electrical_components.rb +27 -0
  37. data/lib/faker/default/file.rb +9 -26
  38. data/lib/faker/default/fillmurray.rb +4 -11
  39. data/lib/faker/default/finance.rb +2 -3
  40. data/lib/faker/default/gender.rb +18 -0
  41. data/lib/faker/default/greek_philosophers.rb +18 -0
  42. data/lib/faker/default/hacker.rb +59 -1
  43. data/lib/faker/default/hipster.rb +21 -54
  44. data/lib/faker/default/house.rb +18 -0
  45. data/lib/faker/default/id_number.rb +5 -7
  46. data/lib/faker/default/industry_segments.rb +36 -0
  47. data/lib/faker/default/internet.rb +49 -76
  48. data/lib/faker/default/invoice.rb +7 -13
  49. data/lib/faker/default/json.rb +9 -16
  50. data/lib/faker/default/lorem.rb +38 -77
  51. data/lib/faker/default/lorem_flickr.rb +17 -48
  52. data/lib/faker/default/lorem_pixel.rb +7 -23
  53. data/lib/faker/default/markdown.rb +3 -7
  54. data/lib/faker/default/marketing.rb +9 -0
  55. data/lib/faker/default/measurement.rb +16 -24
  56. data/lib/faker/default/military.rb +45 -0
  57. data/lib/faker/default/name.rb +2 -3
  58. data/lib/faker/default/nation.rb +48 -5
  59. data/lib/faker/default/nato_phonetic_alphabet.rb +9 -0
  60. data/lib/faker/default/nhs.rb +2 -3
  61. data/lib/faker/default/number.rb +150 -51
  62. data/lib/faker/default/omniauth.rb +67 -63
  63. data/lib/faker/default/phone_number.rb +2 -3
  64. data/lib/faker/default/placeholdit.rb +6 -19
  65. data/lib/faker/default/programming_language.rb +18 -0
  66. data/lib/faker/default/relationship.rb +2 -3
  67. data/lib/faker/default/restaurant.rb +54 -2
  68. data/lib/faker/default/science.rb +27 -0
  69. data/lib/faker/default/source.rb +51 -14
  70. data/lib/faker/default/string.rb +2 -3
  71. data/lib/faker/default/stripe.rb +8 -12
  72. data/lib/faker/default/subscription.rb +45 -0
  73. data/lib/faker/default/superhero.rb +45 -0
  74. data/lib/faker/default/time.rb +102 -56
  75. data/lib/faker/default/twitter.rb +23 -32
  76. data/lib/faker/default/types.rb +12 -23
  77. data/lib/faker/default/vehicle.rb +8 -14
  78. data/lib/faker/default/world_cup.rb +5 -10
  79. data/lib/faker/games/dota.rb +49 -3
  80. data/lib/faker/games/elder_scrolls.rb +72 -0
  81. data/lib/faker/games/fallout.rb +37 -0
  82. data/lib/faker/games/game.rb +27 -0
  83. data/lib/faker/games/half_life.rb +27 -0
  84. data/lib/faker/games/heroes.rb +27 -0
  85. data/lib/faker/games/heroes_of_the_storm.rb +36 -0
  86. data/lib/faker/games/league_of_legends.rb +54 -0
  87. data/lib/faker/games/myst.rb +45 -0
  88. data/lib/faker/games/overwatch.rb +27 -0
  89. data/lib/faker/games/pokemon.rb +27 -0
  90. data/lib/faker/games/sonic_the_hedgehog.rb +27 -0
  91. data/lib/faker/games/super_smash_bros.rb +18 -0
  92. data/lib/faker/games/witcher.rb +54 -0
  93. data/lib/faker/games/world_of_warcraft.rb +18 -0
  94. data/lib/faker/games/zelda.rb +37 -1
  95. data/lib/faker/japanese_media/dragon_ball.rb +9 -0
  96. data/lib/faker/japanese_media/one_piece.rb +54 -0
  97. data/lib/faker/japanese_media/sword_art_online.rb +36 -0
  98. data/lib/faker/movies/back_to_the_future.rb +28 -0
  99. data/lib/faker/movies/ghostbusters.rb +28 -0
  100. data/lib/faker/movies/harry_potter.rb +54 -0
  101. data/lib/faker/movies/hitchhikers_guide_to_the_galaxy.rb +69 -0
  102. data/lib/faker/movies/hobbit.rb +37 -0
  103. data/lib/faker/movies/lebowski.rb +27 -0
  104. data/lib/faker/movies/lord_of_the_rings.rb +28 -0
  105. data/lib/faker/movies/movie.rb +9 -0
  106. data/lib/faker/movies/princess_bride.rb +19 -0
  107. data/lib/faker/movies/star_wars.rb +97 -6
  108. data/lib/faker/movies/v_for_vendetta.rb +29 -0
  109. data/lib/faker/music/grateful_dead.rb +18 -0
  110. data/lib/faker/music/phish.rb +9 -0
  111. data/lib/faker/music/rock_band.rb +9 -0
  112. data/lib/faker/music/umphreys_mcgee.rb +9 -0
  113. data/lib/faker/sports/basketball.rb +36 -0
  114. data/lib/faker/sports/football.rb +45 -0
  115. data/lib/faker/tv_shows/aqua_teen_hunger_force.rb +9 -0
  116. data/lib/faker/tv_shows/bojack_horseman.rb +28 -0
  117. data/lib/faker/tv_shows/breaking_bad.rb +18 -0
  118. data/lib/faker/tv_shows/buffy.rb +45 -0
  119. data/lib/faker/tv_shows/community.rb +19 -0
  120. data/lib/faker/tv_shows/dr_who.rb +78 -2
  121. data/lib/faker/tv_shows/dumb_and_dumber.rb +28 -0
  122. data/lib/faker/tv_shows/family_guy.rb +28 -0
  123. data/lib/faker/tv_shows/friends.rb +27 -0
  124. data/lib/faker/tv_shows/game_of_thrones.rb +46 -0
  125. data/lib/faker/tv_shows/hey_arnold.rb +27 -0
  126. data/lib/faker/tv_shows/how_i_met_your_mother.rb +37 -0
  127. data/lib/faker/tv_shows/michael_scott.rb +13 -0
  128. data/lib/faker/tv_shows/new_girl.rb +19 -0
  129. data/lib/faker/tv_shows/parks_and_rec.rb +18 -0
  130. data/lib/faker/tv_shows/rick_and_morty.rb +28 -0
  131. data/lib/faker/tv_shows/ru_paul.rb +18 -0
  132. data/lib/faker/tv_shows/seinfeld.rb +28 -0
  133. data/lib/faker/tv_shows/silicon_valley.rb +75 -0
  134. data/lib/faker/tv_shows/simpsons.rb +28 -0
  135. data/lib/faker/tv_shows/south_park.rb +19 -0
  136. data/lib/faker/tv_shows/star_trek.rb +36 -0
  137. data/lib/faker/tv_shows/stargate.rb +28 -0
  138. data/lib/faker/tv_shows/stranger_things.rb +19 -0
  139. data/lib/faker/tv_shows/the_expanse.rb +36 -0
  140. data/lib/faker/tv_shows/the_fresh_prince_of_bel_air.rb +28 -0
  141. data/lib/faker/tv_shows/the_it_crowd.rb +37 -0
  142. data/lib/faker/tv_shows/the_thick_of_it.rb +28 -0
  143. data/lib/faker/tv_shows/twin_peaks.rb +28 -0
  144. data/lib/faker/tv_shows/venture_bros.rb +38 -0
  145. data/lib/faker/version.rb +1 -1
  146. data/lib/locales/en-CA.yml +1 -1
  147. data/lib/locales/en-TH.yml +360 -0
  148. data/lib/locales/en/color.yml +1 -1
  149. data/lib/locales/en/dr_who.yml +1 -1
  150. data/lib/locales/en/science.yml +1 -1
  151. data/lib/locales/ja.yml +8 -9
  152. data/lib/locales/th.yml +380 -0
  153. metadata +33 -14
@@ -8,9 +8,8 @@ module Faker
8
8
 
9
9
  class << self
10
10
  def rb_string(legacy_words = NOT_GIVEN, words: 1)
11
- if legacy_words != NOT_GIVEN
12
- warn_with_uplevel 'Passing `words` with the 1st argument of `Types.rb_string` is deprecated. Use keyword argument like `Types.rb_string(words: ...)` instead.', uplevel: 1
13
- words = legacy_words
11
+ warn_for_deprecated_arguments do |keywords|
12
+ keywords << :words if legacy_words != NOT_GIVEN
14
13
  end
15
14
 
16
15
  resolved_num = resolve(words)
@@ -26,26 +25,18 @@ module Faker
26
25
  end
27
26
 
28
27
  def rb_integer(legacy_from = NOT_GIVEN, legacy_to = NOT_GIVEN, from: 0, to: 100)
29
- if legacy_from != NOT_GIVEN
30
- warn_with_uplevel 'Passing `from` with the 1st argument of `Types.rb_integer` is deprecated. Use keyword argument like `Types.rb_integer(from: ...)` instead.', uplevel: 1
31
- from = legacy_from
32
- end
33
- if legacy_to != NOT_GIVEN
34
- warn_with_uplevel 'Passing `to` with the 2nd argument of `Types.rb_integer` is deprecated. Use keyword argument like `Types.rb_integer(to: ...)` instead.', uplevel: 1
35
- to = legacy_to
28
+ warn_for_deprecated_arguments do |keywords|
29
+ keywords << :from if legacy_from != NOT_GIVEN
30
+ keywords << :to if legacy_to != NOT_GIVEN
36
31
  end
37
32
 
38
33
  rand(from..to).to_i
39
34
  end
40
35
 
41
36
  def rb_hash(legacy_number = NOT_GIVEN, legacy_type = NOT_GIVEN, number: 1, type: random_type)
42
- if legacy_number != NOT_GIVEN
43
- warn_with_uplevel 'Passing `number` with the 1st argument of `Types.rb_hash` is deprecated. Use keyword argument like `Types.rb_hash(number: ...)` instead.', uplevel: 1
44
- number = legacy_number
45
- end
46
- if legacy_type != NOT_GIVEN
47
- warn_with_uplevel 'Passing `type` with the 2nd argument of `Types.rb_hash` is deprecated. Use keyword argument like `Types.rb_hash(type: ...)` instead.', uplevel: 1
48
- type = legacy_type
37
+ warn_for_deprecated_arguments do |keywords|
38
+ keywords << :number if legacy_number != NOT_GIVEN
39
+ keywords << :type if legacy_type != NOT_GIVEN
49
40
  end
50
41
 
51
42
  {}.tap do |hsh|
@@ -56,18 +47,16 @@ module Faker
56
47
  end
57
48
 
58
49
  def complex_rb_hash(legacy_number = NOT_GIVEN, number: 1)
59
- if legacy_number != NOT_GIVEN
60
- warn_with_uplevel 'Passing `number` with the 1st argument of `Types.complex_rb_hash` is deprecated. Use keyword argument like `Types.complex_rb_hash(number: ...)` instead.', uplevel: 1
61
- number = legacy_number
50
+ warn_for_deprecated_arguments do |keywords|
51
+ keywords << :number if legacy_number != NOT_GIVEN
62
52
  end
63
53
 
64
54
  rb_hash(number: number, type: random_complex_type)
65
55
  end
66
56
 
67
57
  def rb_array(legacy_len = NOT_GIVEN, len: 1)
68
- if legacy_len != NOT_GIVEN
69
- warn_with_uplevel 'Passing `len` with the 1st argument of `Types.rb_array` is deprecated. Use keyword argument like `Types.rb_array(len: ...)` instead.', uplevel: 1
70
- len = legacy_len
58
+ warn_for_deprecated_arguments do |keywords|
59
+ keywords << :len if legacy_len != NOT_GIVEN
71
60
  end
72
61
 
73
62
  [].tap do |ar|
@@ -9,7 +9,7 @@ module Faker
9
9
  VIN_LETTERS = 'ABCDEFGHJKLMNPRSTUVWXYZ'
10
10
  VIN_MAP = '0123456789X'
11
11
  VIN_WEIGHTS = '8765432X098765432'
12
- VIN_REGEX = /^[A-Z0-9]{3}[A-Z0-9]{5}[A-Z0-9]{1}[A-Z0-9]{1}[A-Z0-0]{1}[A-Z0-9]{1}\d{5}$/
12
+ VIN_REGEX = /^[A-Z0-9]{3}[A-Z0-9]{5}[A-Z0-9]{1}[A-Z0-9]{1}[A-Z0-0]{1}[A-Z0-9]{1}\d{5}$/.freeze
13
13
  SG_CHECKSUM_WEIGHTS = [3, 14, 2, 12, 2, 11, 1].freeze
14
14
  SG_CHECKSUM_CHARS = 'AYUSPLJGDBZXTRMKHEC'
15
15
 
@@ -27,9 +27,8 @@ module Faker
27
27
  end
28
28
 
29
29
  def model(legacy_make_of_model = NOT_GIVEN, make_of_model: '')
30
- if legacy_make_of_model != NOT_GIVEN
31
- warn_with_uplevel 'Passing `make_of_model` with the 1st argument of `Vehicle.model` is deprecated. Use keyword argument like `Vehicle.model(make_of_model: ...)` instead.', uplevel: 1
32
- make_of_model = legacy_make_of_model
30
+ warn_for_deprecated_arguments do |keywords|
31
+ keywords << :make_of_model if legacy_make_of_model != NOT_GIVEN
33
32
  end
34
33
 
35
34
  return fetch("vehicle.models_by_make.#{make}") if make_of_model.empty?
@@ -91,13 +90,9 @@ module Faker
91
90
  end
92
91
 
93
92
  def mileage(legacy_min = NOT_GIVEN, legacy_max = NOT_GIVEN, min: MILEAGE_MIN, max: MILEAGE_MAX)
94
- if legacy_min != NOT_GIVEN
95
- warn_with_uplevel 'Passing `min` with the 1st argument of `Vehicle.mileage` is deprecated. Use keyword argument like `Vehicle.mileage(min: ...)` instead.', uplevel: 1
96
- min = legacy_min
97
- end
98
- if legacy_max != NOT_GIVEN
99
- warn_with_uplevel 'Passing `max` with the 2nd argument of `Vehicle.mileage` is deprecated. Use keyword argument like `Vehicle.mileage(max: ...)` instead.', uplevel: 1
100
- max = legacy_max
93
+ warn_for_deprecated_arguments do |keywords|
94
+ keywords << :min if legacy_min != NOT_GIVEN
95
+ keywords << :max if legacy_max != NOT_GIVEN
101
96
  end
102
97
 
103
98
  rand_in_range(min, max)
@@ -106,9 +101,8 @@ module Faker
106
101
  alias kilometrage mileage
107
102
 
108
103
  def license_plate(legacy_state_abreviation = NOT_GIVEN, state_abreviation: '')
109
- if legacy_state_abreviation != NOT_GIVEN
110
- warn_with_uplevel 'Passing `state_abreviation` with the 1st argument of `Vehicle.license_plate` is deprecated. Use keyword argument like `Vehicle.license_plate(state_abreviation: ...)` instead.', uplevel: 1
111
- state_abreviation = legacy_state_abreviation
104
+ warn_for_deprecated_arguments do |keywords|
105
+ keywords << :state_abreviation if legacy_state_abreviation != NOT_GIVEN
112
106
  end
113
107
 
114
108
  return regexify(bothify(fetch('vehicle.license_plate'))) if state_abreviation.empty?
@@ -16,22 +16,17 @@ module Faker
16
16
  end
17
17
 
18
18
  def group(legacy_group = NOT_GIVEN, group: 'group_A')
19
- if legacy_group != NOT_GIVEN
20
- warn_with_uplevel 'Passing `group` with the 1st argument of `WorldCup.group` is deprecated. Use keyword argument like `WorldCup.group(group: ...)` instead.', uplevel: 1
21
- group = legacy_group
19
+ warn_for_deprecated_arguments do |keywords|
20
+ keywords << :group if legacy_group != NOT_GIVEN
22
21
  end
23
22
 
24
23
  fetch("world_cup.groups.#{group}")
25
24
  end
26
25
 
27
26
  def roster(legacy_country = NOT_GIVEN, legacy_type = NOT_GIVEN, country: 'Egypt', type: 'coach')
28
- if legacy_country != NOT_GIVEN
29
- warn_with_uplevel 'Passing `country` with the 1st argument of `WorldCup.roster` is deprecated. Use keyword argument like `WorldCup.roster(country: ...)` instead.', uplevel: 1
30
- country = legacy_country
31
- end
32
- if legacy_type != NOT_GIVEN
33
- warn_with_uplevel 'Passing `type` with the 2nd argument of `WorldCup.roster` is deprecated. Use keyword argument like `WorldCup.roster(type: ...)` instead.', uplevel: 1
34
- type = legacy_type
27
+ warn_for_deprecated_arguments do |keywords|
28
+ keywords << :country if legacy_country != NOT_GIVEN
29
+ keywords << :type if legacy_type != NOT_GIVEN
35
30
  end
36
31
 
37
32
  fetch("world_cup.rosters.#{country}.#{type}")
@@ -4,26 +4,72 @@ module Faker
4
4
  class Games
5
5
  class Dota < Base
6
6
  class << self
7
+ ##
8
+ # Produces the name of a hero from Dota.
9
+ #
10
+ # @return [String]
11
+ #
12
+ # @example
13
+ # Faker::Games::Dota.hero #=> "Abaddon"
14
+ #
15
+ # @faker.version 1.9.0
7
16
  def hero
8
17
  fetch('games.dota.hero')
9
18
  end
10
19
 
20
+ ##
21
+ # Produces the name of an item from Dota.
22
+ #
23
+ # @return [String]
24
+ #
25
+ # @example
26
+ # Faker::Games::Dota.item #=> "Armlet of Mordiggian"
27
+ #
28
+ # @faker.version 1.9.0
11
29
  def item
12
30
  fetch('games.dota.item')
13
31
  end
14
32
 
33
+ ##
34
+ # Produces the name of a professional Dota team.
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @example
39
+ # Faker::Games::Dota.team #=> "Evil Geniuses"
40
+ #
41
+ # @faker.version 1.9.0
15
42
  def team
16
43
  fetch('games.dota.team')
17
44
  end
18
45
 
46
+ ##
47
+ # Produces the name of a professional Dota player.
48
+ #
49
+ # @return [String]
50
+ #
51
+ # @example
52
+ # Faker::Games::Dota.player #=> "Dendi"
53
+ #
54
+ # @faker.version 1.9.0
19
55
  def player
20
56
  fetch('games.dota.player')
21
57
  end
22
58
 
59
+ ##
60
+ # Produces the name of a hero from Dota.
61
+ #
62
+ # @param hero [String] The name of a Dota hero.
63
+ # @return [String]
64
+ #
65
+ # @example
66
+ # Faker::Games::Dota.quote #=> "You have called death upon yourself."
67
+ # Faker::Games::Dota.quote(hero: 'alchemist') #=> "Better living through alchemy!"
68
+ #
69
+ # @faker.version 1.9.0
23
70
  def quote(legacy_hero = NOT_GIVEN, hero: 'abaddon')
24
- if legacy_hero != NOT_GIVEN
25
- warn_with_uplevel 'Passing `hero` with the 1st argument of `Dota.quote` is deprecated. Use keyword argument like `Dota.quote(hero: ...)` instead.', uplevel: 1
26
- hero = legacy_hero
71
+ warn_for_deprecated_arguments do |keywords|
72
+ keywords << :hero if legacy_hero != NOT_GIVEN
27
73
  end
28
74
 
29
75
  fetch("games.dota.#{hero}.quote")
@@ -4,34 +4,106 @@ module Faker
4
4
  class Games
5
5
  class ElderScrolls < Base
6
6
  class << self
7
+ ##
8
+ # Produces the name of a race from the Elder Scrolls universe.
9
+ #
10
+ # @return [String]
11
+ #
12
+ # @example
13
+ # Faker::Games::ElderScrolls.race #=> "Argonian"
14
+ #
15
+ # @faker.version 1.9.2
7
16
  def race
8
17
  fetch('games.elder_scrolls.race')
9
18
  end
10
19
 
20
+ ##
21
+ # Produces the name of a city from the Elder Scrolls universe.
22
+ #
23
+ # @return [String]
24
+ #
25
+ # @example
26
+ # Faker::Games::ElderScrolls.city #=> "Whiterun"
27
+ #
28
+ # @faker.version 1.9.2
11
29
  def city
12
30
  fetch('games.elder_scrolls.city')
13
31
  end
14
32
 
33
+ ##
34
+ # Produces the name of a creature from the Elder Scrolls universe.
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @example
39
+ # Faker::Games::ElderScrolls.creature #=> "Frost Troll"
40
+ #
41
+ # @faker.version 1.9.2
15
42
  def creature
16
43
  fetch('games.elder_scrolls.creature')
17
44
  end
18
45
 
46
+ ##
47
+ # Produces the name of a region from the Elder Scrolls universe.
48
+ #
49
+ # @return [String]
50
+ #
51
+ # @example
52
+ # Faker::Games::ElderScrolls.region #=> "Cyrodiil"
53
+ #
54
+ # @faker.version 1.9.2
19
55
  def region
20
56
  fetch('games.elder_scrolls.region')
21
57
  end
22
58
 
59
+ ##
60
+ # Produces the name of a dragon from the Elder Scrolls universe.
61
+ #
62
+ # @return [String]
63
+ #
64
+ # @example
65
+ # Faker::Games::ElderScrolls.dragon #=> "Blood Dragon"
66
+ #
67
+ # @faker.version 1.9.2
23
68
  def dragon
24
69
  fetch('games.elder_scrolls.dragon')
25
70
  end
26
71
 
72
+ ##
73
+ # Produces a randomly generated name from the Elder Scrolls universe.
74
+ #
75
+ # @return [String]
76
+ #
77
+ # @example
78
+ # Faker::Games::ElderScrolls.name #=> "Balgruuf The Old"
79
+ #
80
+ # @faker.version 1.9.2
27
81
  def name
28
82
  "#{fetch('games.elder_scrolls.first_name')} #{fetch('games.elder_scrolls.last_name')}"
29
83
  end
30
84
 
85
+ ##
86
+ # Produces a first name from the Elder Scrolls universe.
87
+ #
88
+ # @return [String]
89
+ #
90
+ # @example
91
+ # Faker::Games::ElderScrolls.first_name #=> "Balgruuf"
92
+ #
93
+ # @faker.version 1.9.2
31
94
  def first_name
32
95
  fetch('games.elder_scrolls.first_name')
33
96
  end
34
97
 
98
+ ##
99
+ # Produces a last name from the Elder Scrolls universe.
100
+ #
101
+ # @return [String]
102
+ #
103
+ # @example
104
+ # Faker::Games::ElderScrolls.last_name #=> "The Old"
105
+ #
106
+ # @faker.version 1.9.2
35
107
  def last_name
36
108
  fetch('games.elder_scrolls.last_name')
37
109
  end
@@ -4,18 +4,55 @@ module Faker
4
4
  class Games
5
5
  class Fallout < Base
6
6
  class << self
7
+ ##
8
+ # Produces the name of a character from the Fallout games.
9
+ #
10
+ # @return [String]
11
+ #
12
+ # @example
13
+ # Faker::Games::Fallout.character #=> "Liberty Prime"
14
+ #
15
+ # @faker.version 1.9.2
7
16
  def character
8
17
  fetch('games.fallout.characters')
9
18
  end
10
19
 
20
+ ##
21
+ # Produces the name of a faction from the Fallout games.
22
+ #
23
+ # @return [String]
24
+ #
25
+ # @example
26
+ # Faker::Games::Fallout.faction #=> "Brotherhood of Steel"
27
+ #
28
+ # @faker.version 1.9.2
11
29
  def faction
12
30
  fetch('games.fallout.factions')
13
31
  end
14
32
 
33
+ ##
34
+ # Produces the name of a location from the Fallout games.
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @example
39
+ # Faker::Games::Fallout.location #=> "New Vegas"
40
+ #
41
+ # @faker.version 1.9.2
15
42
  def location
16
43
  fetch('games.fallout.locations')
17
44
  end
18
45
 
46
+ ##
47
+ # Produces a quote from the Fallout games.
48
+ #
49
+ # @return [String]
50
+ #
51
+ # @example
52
+ # Faker::Games::Fallout.quote
53
+ # #=> "Democracy is non-negotiable"
54
+ #
55
+ # @faker.version 1.9.2
19
56
  def quote
20
57
  fetch('games.fallout.quotes')
21
58
  end
@@ -5,14 +5,41 @@ module Faker
5
5
  flexible :game
6
6
 
7
7
  class << self
8
+ ##
9
+ # Produces the name of a video game.
10
+ #
11
+ # @return [String]
12
+ #
13
+ # @example
14
+ # Faker::Game.title #=> "Half-Life 2"
15
+ #
16
+ # @faker.version 1.9.4
8
17
  def title
9
18
  fetch('game.title')
10
19
  end
11
20
 
21
+ ##
22
+ # Produces the name of a video game genre.
23
+ #
24
+ # @return [String]
25
+ #
26
+ # @example
27
+ # Faker::Game.genre #=> "Real-time strategy"
28
+ #
29
+ # @faker.version 1.9.4
12
30
  def genre
13
31
  fetch('game.genre')
14
32
  end
15
33
 
34
+ ##
35
+ # Produces the name of a video game console or platform.
36
+ #
37
+ # @return [String]
38
+ #
39
+ # @example
40
+ # Faker::Game.platform #=> "Nintendo Switch"
41
+ #
42
+ # @faker.version 1.9.4
16
43
  def platform
17
44
  fetch('game.platform')
18
45
  end
@@ -4,14 +4,41 @@ module Faker
4
4
  class Games
5
5
  class HalfLife < Base
6
6
  class << self
7
+ ##
8
+ # Produces the name of a character from the Half-Life games.
9
+ #
10
+ # @return [String]
11
+ #
12
+ # @example
13
+ # Faker::Games::HalfLife.character #=> "Gordon Freeman"
14
+ #
15
+ # @faker.version 1.9.2
7
16
  def character
8
17
  fetch('games.half_life.character')
9
18
  end
10
19
 
20
+ ##
21
+ # Produces the name of an enemy from the Half-Life games.
22
+ #
23
+ # @return [String]
24
+ #
25
+ # @example
26
+ # Faker::Games::HalfLife.enemy #=> "Headcrab"
27
+ #
28
+ # @faker.version 1.9.2
11
29
  def enemy
12
30
  fetch('games.half_life.enemy')
13
31
  end
14
32
 
33
+ ##
34
+ # Produces the name of a location from the Half-Life games.
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @example
39
+ # Faker::Games::HalfLife.location #=> "Black Mesa Research Facility"
40
+ #
41
+ # @faker.version 1.9.2
15
42
  def location
16
43
  fetch('games.half_life.location')
17
44
  end