Repository navigation
Expand file tree
/
Copy pathdota.rb
More file actions
93 lines (86 loc) · 2.18 KB
/
Copy pathdota.rb
File metadata and controls
93 lines (86 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# frozen_string_literal: true
module Faker
class Games
class Dota < Base
class << self
##
# Produces the name of a building from Dota.
#
# @return [String]
#
# @example
# Faker::Games::Dota.building #=> "Tower"
#
# @faker.version 1.9.0
def building
fetch('games.dota.building')
end
##
# Produces the name of a hero from Dota.
#
# @return [String]
#
# @example
# Faker::Games::Dota.hero #=> "Abaddon"
#
# @faker.version 1.9.0
def hero
fetch('games.dota.hero')
end
##
# Produces the name of an item from Dota.
#
# @return [String]
#
# @example
# Faker::Games::Dota.item #=> "Armlet of Mordiggian"
#
# @faker.version 1.9.0
def item
fetch('games.dota.item')
end
##
# Produces the name of a professional Dota team.
#
# @return [String]
#
# @example
# Faker::Games::Dota.team #=> "Evil Geniuses"
#
# @faker.version 1.9.0
def team
fetch('games.dota.team')
end
##
# Produces the name of a professional Dota player.
#
# @return [String]
#
# @example
# Faker::Games::Dota.player #=> "Dendi"
#
# @faker.version 1.9.0
def player
fetch('games.dota.player')
end
##
# Produces the name of a hero from Dota.
#
# @param hero [String] The name of a Dota hero.
# @return [String]
#
# @example
# Faker::Games::Dota.quote #=> "You have called death upon yourself."
# Faker::Games::Dota.quote(hero: 'alchemist') #=> "Better living through alchemy!"
#
# @faker.version 1.9.0
def quote(legacy_hero = NOT_GIVEN, hero: 'abaddon')
warn_for_deprecated_arguments do |keywords|
keywords << :hero if legacy_hero != NOT_GIVEN
end
fetch("games.dota.#{hero}.quote")
end
end
end
end
end