From f48dfed32b5193368d28a1e3e2c511b64518ea64 Mon Sep 17 00:00:00 2001 From: Griffin Riley Date: Wed, 7 Jun 2023 12:44:34 -0700 Subject: [PATCH] added yard style docs for all methods --- .../international_phonetic_alphabet.rb | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/lib/faker/default/international_phonetic_alphabet.rb b/lib/faker/default/international_phonetic_alphabet.rb index 67ecb1ac87..ef71431cf0 100644 --- a/lib/faker/default/international_phonetic_alphabet.rb +++ b/lib/faker/default/international_phonetic_alphabet.rb @@ -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