forked from faker-ruby/faker
/
basketball.rb
61 lines (57 loc) · 1.32 KB
/
basketball.rb
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
# frozen_string_literal: true
module Faker
class Sports
class Basketball < Base
class << self
##
# Produces the name of a basketball team.
#
# @return [String]
#
# @example
# Faker::Sports::Basketball.team #=> "Golden State Warriors"
#
# @faker.version 1.9.4
def team
fetch('basketball.teams')
end
##
# Produces the name of a basketball player.
#
# @return [String]
#
# @example
# Faker::Sports::Basketball.player #=> "LeBron James"
#
# @faker.version 1.9.4
def player
fetch('basketball.players')
end
##
# Produces the name of a basketball coach.
#
# @return [String]
#
# @example
# Faker::Sports::Basketball.coach #=> "Gregg Popovich"
#
# @faker.version 1.9.4
def coach
fetch('basketball.coaches')
end
##
# Produces a position in basketball.
#
# @return [String]
#
# @example
# Faker::Sports::Basketball.position #=> "Point Guard"
#
# @faker.version 1.9.4
def position
fetch('basketball.positions')
end
end
end
end
end