Skip to content

Commit

Permalink
added yard style docs for all methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Grifff17 committed Jun 7, 2023
1 parent 32bd862 commit f48dfed
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions lib/faker/default/international_phonetic_alphabet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,50 @@ class InternationalPhoneticAlphabet < Base

class << self

##
# Produces random symbols for consonants in the international phonetic alphabet
#
# @param amount [Integer] The number of consonants to generate
#
# @return [String]
#
# @example
# Faker::InternationalPhoneticAlphabet.consonant #=> "ʂ"
# Faker::InternationalPhoneticAlphabet.consonant(amount: 3) #=> "fʕŋ"
#
# @faker.version next
def consonant(amount: 1)
(1..amount).map{fetch('international_phonetic_alphabet.consonants')}.join
end

##
# Produces random symbols for vowels in the international phonetic alphabet
#
# @param amount [Integer] The number of vowels to generate
#
# @return [String]
#
# @example
# Faker::InternationalPhoneticAlphabet.vowel #=> "ɞ"
# Faker::InternationalPhoneticAlphabet.vowel(amount: 3) #=> "əæɜ"
#
# @faker.version next
def vowel(amount: 1)
(1..amount).map{fetch('international_phonetic_alphabet.vowels')}.join
end

##
# Produces random symbols for characters in the international phonetic alphabet
#
# @param amount [Integer] The number of characters to generate
#
# @return [String]
#
# @example
# Faker::InternationalPhoneticAlphabet.character #=> "ʋ"
# Faker::InternationalPhoneticAlphabet.character(amount: 3) #=> "ɜʐd"
#
# @faker.version next
def character(amount: 1)
(1..amount).map{fetch('international_phonetic_alphabet.characters')}.join
end
Expand Down

0 comments on commit f48dfed

Please sign in to comment.