Class: Faker::Music
Constant Summary
Constants inherited
from Base
Base::Letters, Base::Numbers, Base::ULetters
Class Method Summary
collapse
Methods inherited from Base
bothify, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand_in_range, regexify, translate, with_locale
Class Method Details
.instrument ⇒ Object
8
9
10
|
# File 'lib/faker/music.rb', line 8
def instrument
fetch('music.instruments')
end
|
.key ⇒ Object
4
5
6
|
# File 'lib/faker/music.rb', line 4
def key
keys.sample + key_variants.sample
end
|
.key_variants ⇒ Object
16
17
18
|
# File 'lib/faker/music.rb', line 16
def key_variants
['b', '#', '']
end
|
.keys ⇒ Object
12
13
14
|
# File 'lib/faker/music.rb', line 12
def keys
['C', 'D', 'E', 'F', 'G', 'A', 'B']
end
|