faker 2.9.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +231 -0
- data/README.md +12 -3
- data/lib/faker.rb +21 -14
- data/lib/faker/default/address.rb +13 -0
- data/lib/faker/default/bank.rb +80 -1
- data/lib/faker/default/blood.rb +48 -0
- data/lib/faker/default/business.rb +1 -1
- data/lib/faker/default/cannabis.rb +80 -0
- data/lib/faker/default/commerce.rb +73 -10
- data/lib/faker/default/company.rb +275 -4
- data/lib/faker/default/compass.rb +135 -0
- data/lib/faker/default/computer.rb +63 -0
- data/lib/faker/default/construction.rb +54 -0
- data/lib/faker/default/cosmere.rb +90 -0
- data/lib/faker/default/crypto_coin.rb +45 -0
- data/lib/faker/default/dc_comics.rb +45 -0
- data/lib/faker/default/driving_licence.rb +42 -0
- data/lib/faker/default/file.rb +51 -2
- data/lib/faker/default/finance.rb +24 -0
- data/lib/faker/default/funny_name.rb +45 -0
- data/lib/faker/default/hipster.rb +94 -0
- data/lib/faker/default/internet.rb +29 -0
- data/lib/faker/default/invoice.rb +32 -5
- data/lib/faker/default/json.rb +55 -0
- data/lib/faker/default/lorem.rb +1 -1
- data/lib/faker/default/measurement.rb +90 -0
- data/lib/faker/default/name.rb +83 -0
- data/lib/faker/default/omniauth.rb +47 -47
- data/lib/faker/default/phone_number.rb +88 -5
- data/lib/faker/default/placeholdit.rb +21 -0
- data/lib/faker/default/slack_emoji.rb +81 -0
- data/lib/faker/default/south_africa.rb +90 -0
- data/lib/faker/default/string.rb +19 -3
- data/lib/faker/default/stripe.rb +61 -0
- data/lib/faker/default/twitter.rb +35 -0
- data/lib/faker/default/types.rb +80 -0
- data/lib/faker/default/university.rb +45 -0
- data/lib/faker/default/vehicle.rb +184 -4
- data/lib/faker/default/verb.rb +45 -0
- data/lib/faker/games/control.rb +113 -0
- data/lib/faker/games/dnd.rb +61 -0
- data/lib/faker/games/warhammer_fantasy.rb +74 -0
- data/lib/faker/movies/departed.rb +49 -0
- data/lib/faker/music/music.rb +90 -4
- data/lib/faker/music/opera.rb +36 -0
- data/lib/faker/music/pearl_jam.rb +50 -0
- data/lib/faker/music/phish.rb +27 -1
- data/lib/faker/music/show.rb +49 -0
- data/lib/faker/quotes/chiquito.rb +80 -0
- data/lib/faker/quotes/quote.rb +54 -1
- data/lib/faker/quotes/rajnikanth.rb +26 -0
- data/lib/faker/quotes/shakespeare.rb +36 -0
- data/lib/faker/tv_shows/suits.rb +37 -0
- data/lib/faker/version.rb +1 -1
- data/lib/helpers/char.rb +2 -1
- data/lib/helpers/unique_generator.rb +4 -0
- data/lib/locales/bg.yml +2 -2
- data/lib/locales/ca.yml +0 -8
- data/lib/locales/da-DK.yml +3 -3
- data/lib/locales/de-CH.yml +1693 -0
- data/lib/locales/en-AU.yml +44 -10
- data/lib/locales/en-CA.yml +2 -0
- data/lib/locales/en-GB.yml +1 -1
- data/lib/locales/en-NEP.yml +1 -1
- data/lib/locales/en-NZ.yml +132 -8
- data/lib/locales/en-US.yml +29 -3
- data/lib/locales/en-ZA.yml +1 -1
- data/lib/locales/en/address.yml +6 -0
- data/lib/locales/en/blood.yml +13 -0
- data/lib/locales/en/chiquito.yml +64 -0
- data/lib/locales/en/color.yml +1 -1
- data/lib/locales/en/computer.yml +36 -0
- data/lib/locales/en/control.yml +247 -0
- data/lib/locales/en/departed.yml +50 -0
- data/lib/locales/en/dnd.yml +54 -0
- data/lib/locales/en/heroes_of_the_storm.yml +1 -1
- data/lib/locales/en/house.yml +1 -1
- data/lib/locales/en/name.yml +1 -1
- data/lib/locales/en/one_piece.yml +2 -2
- data/lib/locales/en/pearl_jam.yml +213 -0
- data/lib/locales/en/phish.yml +392 -1
- data/lib/locales/en/phone_number.yml +1 -1
- data/lib/locales/en/rajnikanth.yml +77 -0
- data/lib/locales/en/shakespeare.yml +3 -3
- data/lib/locales/en/show.yml +597 -0
- data/lib/locales/en/star_wars.yml +568 -221
- data/lib/locales/en/stripe.yml +3 -3
- data/lib/locales/en/suits.yml +45 -0
- data/lib/locales/en/warhammer_fantasy.yml +582 -0
- data/lib/locales/es-MX.yml +3 -0
- data/lib/locales/fr-CA.yml +7 -4
- data/lib/locales/fr-CH.yml +1 -1
- data/lib/locales/fr.yml +5 -4
- data/lib/locales/hy.yml +1 -6
- data/lib/locales/id.yml +2 -1
- data/lib/locales/ja.yml +1 -1
- data/lib/locales/ko.yml +82 -0
- data/lib/locales/pt-BR.yml +1 -0
- data/lib/locales/pt.yml +2 -2
- data/lib/locales/uk.yml +5 -5
- data/lib/locales/zh-CN.yml +1 -1
- data/lib/locales/zh-TW.yml +1 -1
- metadata +37 -16
data/lib/faker/default/verb.rb
CHANGED
|
@@ -3,22 +3,67 @@
|
|
|
3
3
|
module Faker
|
|
4
4
|
class Verb < Base
|
|
5
5
|
class << self
|
|
6
|
+
##
|
|
7
|
+
# Produces the base form of a random verb.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
#
|
|
11
|
+
# @example
|
|
12
|
+
# Faker::Verb.base #=> "hurt"
|
|
13
|
+
#
|
|
14
|
+
# @faker.version 1.9.0
|
|
6
15
|
def base
|
|
7
16
|
fetch('verbs.base')
|
|
8
17
|
end
|
|
9
18
|
|
|
19
|
+
##
|
|
20
|
+
# Produces a random verb in past tense.
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
#
|
|
24
|
+
# @example
|
|
25
|
+
# Faker::Verb.past #=> "completed"
|
|
26
|
+
#
|
|
27
|
+
# @faker.version 1.9.0
|
|
10
28
|
def past
|
|
11
29
|
fetch('verbs.past')
|
|
12
30
|
end
|
|
13
31
|
|
|
32
|
+
##
|
|
33
|
+
# Produces a random verb in past participle.
|
|
34
|
+
#
|
|
35
|
+
# @return [String]
|
|
36
|
+
#
|
|
37
|
+
# @example
|
|
38
|
+
# Faker::Verb.past_participle #=> "digested"
|
|
39
|
+
#
|
|
40
|
+
# @faker.version 1.9.0
|
|
14
41
|
def past_participle
|
|
15
42
|
fetch('verbs.past_participle')
|
|
16
43
|
end
|
|
17
44
|
|
|
45
|
+
##
|
|
46
|
+
# Produces a random verb in simple present.
|
|
47
|
+
#
|
|
48
|
+
# @return [String]
|
|
49
|
+
#
|
|
50
|
+
# @example
|
|
51
|
+
# Faker::Verb.simple_present #=> "climbs"
|
|
52
|
+
#
|
|
53
|
+
# @faker.version 1.9.0
|
|
18
54
|
def simple_present
|
|
19
55
|
fetch('verbs.simple_present')
|
|
20
56
|
end
|
|
21
57
|
|
|
58
|
+
##
|
|
59
|
+
# Produces a random verb in the .ing form.
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
#
|
|
63
|
+
# @example
|
|
64
|
+
# Faker::Verb.ing_form #=> "causing"
|
|
65
|
+
#
|
|
66
|
+
# @faker.version 1.9.0
|
|
22
67
|
def ing_form
|
|
23
68
|
fetch('verbs.ing_form')
|
|
24
69
|
end
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Faker
|
|
4
|
+
class Games
|
|
5
|
+
class Control < Base
|
|
6
|
+
class << self
|
|
7
|
+
##
|
|
8
|
+
# Produces the name of a character from Control.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
#
|
|
12
|
+
# @example
|
|
13
|
+
# Faker::Games::Control.character #=> "Jesse Faden"
|
|
14
|
+
#
|
|
15
|
+
# @faker.version next
|
|
16
|
+
def character
|
|
17
|
+
fetch('games.control.character')
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
##
|
|
21
|
+
# Produces the name of a location from Control.
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
#
|
|
25
|
+
# @example
|
|
26
|
+
# Faker::Games::Control.character #=> "Dimensional Research"
|
|
27
|
+
#
|
|
28
|
+
# @faker.version next
|
|
29
|
+
def location
|
|
30
|
+
fetch('games.control.location')
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
##
|
|
34
|
+
# Produces the name of an Object of Power (OoP)
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
#
|
|
38
|
+
# @example
|
|
39
|
+
# Faker::Games::Control.object_of_power #=> "Hotline"
|
|
40
|
+
#
|
|
41
|
+
# @faker.version next
|
|
42
|
+
def object_of_power
|
|
43
|
+
fetch('games.control.object_of_power')
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# Produces the name of an Altered Item
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
# @example
|
|
52
|
+
# Faker::Games::Control.altered_item #=> "Rubber Duck"
|
|
53
|
+
#
|
|
54
|
+
# @faker.version next
|
|
55
|
+
def altered_item
|
|
56
|
+
fetch('games.control.altered_item')
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
##
|
|
60
|
+
# Produces the location of an Altered World Event (AWE)
|
|
61
|
+
#
|
|
62
|
+
# @return [String]
|
|
63
|
+
#
|
|
64
|
+
# @example
|
|
65
|
+
# Faker::Games::Control.altered_world_event #=> "Ordinary, Wisconsin"
|
|
66
|
+
#
|
|
67
|
+
# @faker.version next
|
|
68
|
+
def altered_world_event
|
|
69
|
+
fetch('games.control.altered_world_event')
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
##
|
|
73
|
+
# Produces a line from the Hiss incantation
|
|
74
|
+
#
|
|
75
|
+
# @return [String]
|
|
76
|
+
#
|
|
77
|
+
# @example
|
|
78
|
+
# Faker::Games::Control.hiss #=> "Push the fingers through the surface into the wet."
|
|
79
|
+
#
|
|
80
|
+
# @faker.version next
|
|
81
|
+
def hiss
|
|
82
|
+
fetch('games.control.hiss')
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
##
|
|
86
|
+
# < Produces a line/quote/message from The Board >
|
|
87
|
+
#
|
|
88
|
+
# @return [String]
|
|
89
|
+
#
|
|
90
|
+
# @example
|
|
91
|
+
# Faker::Games::Control.the_board #=> "< You/We wield the Gun/You. The Board appoints you. Congratulations, Director. >"
|
|
92
|
+
#
|
|
93
|
+
# @faker.version next
|
|
94
|
+
def the_board
|
|
95
|
+
fetch('games.control.the_board')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
##
|
|
99
|
+
# Produces a quote from Control
|
|
100
|
+
#
|
|
101
|
+
# @return [String]
|
|
102
|
+
#
|
|
103
|
+
# @example
|
|
104
|
+
# Faker::Games::Control.quote #=> "He never liked fridge duty"
|
|
105
|
+
#
|
|
106
|
+
# @faker.version next
|
|
107
|
+
def quote
|
|
108
|
+
fetch('games.control.quote')
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Faker
|
|
4
|
+
class Games
|
|
5
|
+
class DnD < Base
|
|
6
|
+
class << self
|
|
7
|
+
##
|
|
8
|
+
# Produces the name of a race from Dungeons and Dragons (PHB).
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
#
|
|
12
|
+
# @example
|
|
13
|
+
# Faker::Games::DnD.race #=> "Dwarf"
|
|
14
|
+
#
|
|
15
|
+
# @faker.version next
|
|
16
|
+
def species
|
|
17
|
+
fetch('dnd.species')
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
##
|
|
21
|
+
# Produces the name of a class from Dungeons and Dragons (PHB).
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
#
|
|
25
|
+
# @example
|
|
26
|
+
# Faker::Games::DnD.klass #=> "Warlock"
|
|
27
|
+
#
|
|
28
|
+
# @faker.version next
|
|
29
|
+
def klass
|
|
30
|
+
fetch('dnd.klasses')
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
##
|
|
34
|
+
# Produces the name of a background from Dungeons and Dragons (PHB).
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
#
|
|
38
|
+
# @example
|
|
39
|
+
# Faker::Games::DnD.background #=> "Urchin"
|
|
40
|
+
#
|
|
41
|
+
# @faker.version next
|
|
42
|
+
def background
|
|
43
|
+
fetch('dnd.backgrounds')
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# Produces the name of an alignment from Dungeons and Dragons.
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
# @example
|
|
52
|
+
# Faker::Games::DnD.alignment #=> "Lawful Neutral"
|
|
53
|
+
#
|
|
54
|
+
# @faker.version next
|
|
55
|
+
def alignment
|
|
56
|
+
fetch('dnd.alignments')
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Faker
|
|
4
|
+
class Games
|
|
5
|
+
class WarhammerFantasy < Base
|
|
6
|
+
class << self
|
|
7
|
+
##
|
|
8
|
+
# Produces the name of a hero from the Warhammer Fantasy setting.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
#
|
|
12
|
+
# @example
|
|
13
|
+
# Faker::Games::WarhammerFantasy.hero #=> "Sigmar Heldenhammer"
|
|
14
|
+
#
|
|
15
|
+
# @faker.version next
|
|
16
|
+
def hero
|
|
17
|
+
fetch('games.warhammer_fantasy.heros')
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
##
|
|
21
|
+
# Produces a quote from the Warhammer Fantasy setting.
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
#
|
|
25
|
+
# @example
|
|
26
|
+
# Faker::Games::WarhammerFantasy.quote #=> "The softest part of a castle is the belly of the man inside."
|
|
27
|
+
#
|
|
28
|
+
# @faker.version next
|
|
29
|
+
def quote
|
|
30
|
+
fetch('games.warhammer_fantasy.quotes')
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
##
|
|
34
|
+
# Produces a location from the Warhammer Fantasy setting.
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
#
|
|
38
|
+
# @example
|
|
39
|
+
# Faker::Games::WarhammerFantasy.location #=> "Lustria"
|
|
40
|
+
#
|
|
41
|
+
# @faker.version next
|
|
42
|
+
def location
|
|
43
|
+
fetch('games.warhammer_fantasy.locations')
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# Produces a faction from the Warhammer Fantasy setting.
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
# @example
|
|
52
|
+
# Faker::Games::WarhammerFantasy.faction #=> "Bretonnia"
|
|
53
|
+
#
|
|
54
|
+
# @faker.version next
|
|
55
|
+
def faction
|
|
56
|
+
fetch('games.warhammer_fantasy.factions')
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
##
|
|
60
|
+
# Produces a creature from the Warhammer Fantasy setting.
|
|
61
|
+
#
|
|
62
|
+
# @return [String]
|
|
63
|
+
#
|
|
64
|
+
# @example
|
|
65
|
+
# Faker::Games::WarhammerFantasy.creature #=> "Hydra"
|
|
66
|
+
#
|
|
67
|
+
# @faker.version next
|
|
68
|
+
def creature
|
|
69
|
+
fetch('games.warhammer_fantasy.creatures')
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Faker
|
|
4
|
+
class Movies
|
|
5
|
+
class Departed < Base
|
|
6
|
+
class << self
|
|
7
|
+
##
|
|
8
|
+
# Produces an actor from The Departed.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
#
|
|
12
|
+
# @example
|
|
13
|
+
# Faker::Movies::Departed.actor #=> "Matt Damon"
|
|
14
|
+
#
|
|
15
|
+
# @faker.version next
|
|
16
|
+
def actor
|
|
17
|
+
fetch('departed.actors')
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
##
|
|
21
|
+
# Produces a character from The Departed.
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
#
|
|
25
|
+
# @example
|
|
26
|
+
# Faker::Movies::Departed.character #=> "Frank Costello"
|
|
27
|
+
#
|
|
28
|
+
# @faker.version next
|
|
29
|
+
def character
|
|
30
|
+
fetch('departed.characters')
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
##
|
|
34
|
+
# Produces a quote from The Departed.
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
#
|
|
38
|
+
# @example
|
|
39
|
+
# Faker::Movies::Departed.quote
|
|
40
|
+
# #=> "I'm the guy who does his job. You must be the other guy"
|
|
41
|
+
#
|
|
42
|
+
# @faker.version next
|
|
43
|
+
def quote
|
|
44
|
+
fetch('departed.quotes')
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
data/lib/faker/music/music.rb
CHANGED
|
@@ -3,42 +3,128 @@
|
|
|
3
3
|
module Faker
|
|
4
4
|
class Music < Base
|
|
5
5
|
class << self
|
|
6
|
+
NOTE_LETTERS = %w[C D E F G A B].freeze
|
|
7
|
+
ACCIDENTAL_SIGNS = ['b', '#', ''].freeze
|
|
8
|
+
KEY_TYPES = ['', 'm'].freeze
|
|
9
|
+
CHORD_TYPES = ['', 'maj', '6', 'maj7', 'm', 'm7', '-7', '7', 'dom7', 'dim', 'dim7', 'm7b5'].freeze
|
|
10
|
+
|
|
11
|
+
##
|
|
12
|
+
# Produces the name of a key/note, using letter notation.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
#
|
|
16
|
+
# @example
|
|
17
|
+
# Faker::Music.key #=> "A#"
|
|
18
|
+
#
|
|
19
|
+
# @faker.version 1.6.4
|
|
6
20
|
def key
|
|
7
21
|
sample(keys) + sample(key_variants)
|
|
8
22
|
end
|
|
9
23
|
|
|
24
|
+
##
|
|
25
|
+
# Produces the name of a chord, using letter notation.
|
|
26
|
+
#
|
|
27
|
+
# @return [String]
|
|
28
|
+
#
|
|
29
|
+
# @example
|
|
30
|
+
# Faker::Music.chord #=> "Adim7"
|
|
31
|
+
#
|
|
32
|
+
# @faker.version 1.6.4
|
|
10
33
|
def chord
|
|
11
34
|
key + sample(chord_types)
|
|
12
35
|
end
|
|
13
36
|
|
|
37
|
+
##
|
|
38
|
+
# Produces the name of an instrument.
|
|
39
|
+
#
|
|
40
|
+
# @return [String]
|
|
41
|
+
#
|
|
42
|
+
# @example
|
|
43
|
+
# Faker::Music.instrument #=> "Acoustic Guitar"
|
|
44
|
+
#
|
|
45
|
+
# @faker.version 1.6.4
|
|
14
46
|
def instrument
|
|
15
47
|
fetch('music.instruments')
|
|
16
48
|
end
|
|
17
49
|
|
|
50
|
+
##
|
|
51
|
+
# Produces an array of the letter names of musical notes, without accidentals.
|
|
52
|
+
#
|
|
53
|
+
# @return [Array<String>]
|
|
54
|
+
#
|
|
55
|
+
# @faker.version 1.6.4
|
|
18
56
|
def keys
|
|
19
|
-
|
|
57
|
+
NOTE_LETTERS
|
|
20
58
|
end
|
|
21
59
|
|
|
60
|
+
##
|
|
61
|
+
# Produces an array of accidentals (with "natural" denoted as an empty string).
|
|
62
|
+
#
|
|
63
|
+
# @return [Array<String>]
|
|
64
|
+
#
|
|
65
|
+
# @faker.version 1.6.4
|
|
22
66
|
def key_variants
|
|
23
|
-
|
|
67
|
+
ACCIDENTAL_SIGNS
|
|
24
68
|
end
|
|
25
69
|
|
|
70
|
+
##
|
|
71
|
+
# Produces an array of key types (with "major" denoted as an empty string).
|
|
72
|
+
#
|
|
73
|
+
# @return [Array<String>]
|
|
74
|
+
#
|
|
75
|
+
# @example
|
|
76
|
+
# Faker::Music.key_types #=> ['', 'm']
|
|
77
|
+
#
|
|
78
|
+
# @faker.version 1.6.4
|
|
26
79
|
def key_types
|
|
27
|
-
|
|
80
|
+
KEY_TYPES
|
|
28
81
|
end
|
|
29
82
|
|
|
83
|
+
##
|
|
84
|
+
# Produces an array of types of chords.
|
|
85
|
+
#
|
|
86
|
+
# @return [Array<String>]
|
|
87
|
+
#
|
|
88
|
+
# @faker.version 1.6.4
|
|
30
89
|
def chord_types
|
|
31
|
-
|
|
90
|
+
CHORD_TYPES
|
|
32
91
|
end
|
|
33
92
|
|
|
93
|
+
##
|
|
94
|
+
# Produces the name of a band.
|
|
95
|
+
#
|
|
96
|
+
# @return [String]
|
|
97
|
+
#
|
|
98
|
+
# @example
|
|
99
|
+
# Faker::Music.band #=> "The Beatles"
|
|
100
|
+
#
|
|
101
|
+
# @faker.version 1.9.1
|
|
34
102
|
def band
|
|
35
103
|
fetch('music.bands')
|
|
36
104
|
end
|
|
37
105
|
|
|
106
|
+
##
|
|
107
|
+
# Produces the name of an album.
|
|
108
|
+
#
|
|
109
|
+
# @return [String]
|
|
110
|
+
#
|
|
111
|
+
# @example
|
|
112
|
+
# Faker::Music.album #=> "Sgt. Pepper's Lonely Hearts Club"
|
|
113
|
+
#
|
|
114
|
+
# @faker.version 1.9.1
|
|
38
115
|
def album
|
|
39
116
|
fetch('music.albums')
|
|
40
117
|
end
|
|
41
118
|
|
|
119
|
+
##
|
|
120
|
+
# Produces the name of a musical genre.
|
|
121
|
+
#
|
|
122
|
+
# @return [String]
|
|
123
|
+
#
|
|
124
|
+
# @example
|
|
125
|
+
# Faker::Music.genre #=> "Rock"
|
|
126
|
+
#
|
|
127
|
+
# @faker.version 1.9.1
|
|
42
128
|
def genre
|
|
43
129
|
fetch('music.genres')
|
|
44
130
|
end
|