Skip to content

Commit

Permalink
update existing yard docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeragamba committed Sep 11, 2019
1 parent 2c27206 commit 100a035
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ Include [YARD] style docs for all methods that includes:
#
# @example
# Faker:Alphanumeric.alpha
# # => "kgdpxlgwjirlqhwhrebvuomdcjjpeqlq"
# #=> "kgdpxlgwjirlqhwhrebvuomdcjjpeqlq"
# Faker:Alphanumeric.alpha(number: 10)
# # => "zlvubkrwga"
# #=> "zlvubkrwga"
#
# @faker.version next
def alpha(number: 32)
Expand Down
6 changes: 3 additions & 3 deletions lib/faker/default/alphanumeric.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def alpha(legacy_number = NOT_GIVEN, number: 32)
##
# Produces a random string of alphanumeric characters
#
# @param [Integer] number
# @param [Integer] min_alpha
# @param [Integer] min_numeric
# @param number [Integer] The number of characters to generate
# @param min_alpha [Integer] The minimum number of alphabetic to add to the string
# @param min_numeric [Integer] The minimum number of numbers to add to the string
#
# @return [String]
#
Expand Down
21 changes: 11 additions & 10 deletions lib/faker/default/internet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,21 @@ def username(legacy_specifier = NOT_GIVEN, legacy_separators = NOT_GIVEN, specif
end

##
# Produces a randomized string of characters
# Produces a randomized string of characters suitable for passwords
#
# @param [Integer] min_length
# @param [Integer] max_length
# @param [Boolean] mix_case
# @param [Boolean] special_characters
# @param min_length [Integer] The minimum length of the password
# @param max_length [Integer] The maximum length of the password
# @param mix_case [Boolean] Toggles if uppercased letters are allowed. If true, at least one will be added.
# @param special_characters [Boolean] Toggles if special characters are allowed. If true, at least one will be added.
#
# @return [String]
#
# @example Faker::Internet.password #=> "Vg5mSvY1UeRg7"
# @example Faker::Internet.password(min_length: 8) #=> "YfGjIk0hGzDqS0"
# @example Faker::Internet.password(min_length: 10, max_length: 20) #=> "EoC9ShWd1hWq4vBgFw"
# @example Faker::Internet.password(min_length: 10, max_length: 20, mix_case: true) #=> "3k5qS15aNmG"
# @example Faker::Internet.password(min_length: 10, max_length: 20, mix_case: true, special_characters: true) #=> "*%NkOnJsH4"
# @example
# Faker::Internet.password #=> "Vg5mSvY1UeRg7"
# Faker::Internet.password(min_length: 8) #=> "YfGjIk0hGzDqS0"
# Faker::Internet.password(min_length: 10, max_length: 20) #=> "EoC9ShWd1hWq4vBgFw"
# Faker::Internet.password(min_length: 10, max_length: 20, mix_case: true) #=> "3k5qS15aNmG"
# Faker::Internet.password(min_length: 10, max_length: 20, mix_case: true, special_characters: true) #=> "*%NkOnJsH4"
#
# @faker.version 2.1.3
# rubocop:disable Metrics/ParameterLists
Expand Down
15 changes: 8 additions & 7 deletions lib/faker/default/lorem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,17 @@ def character
##
# Produces a random string of alphanumeric characters
#
# @param [Integer] number
# @param [Integer] min_alpha
# @param [Integer] min_numeric
# @param number [Integer] The number of characters to generate
# @param min_alpha [Integer] The minimum number of alphabetic to add to the string
# @param min_numeric [Integer] The minimum number of numbers to add to the string
#
# @return [String]
#
# @example Faker::Lorem.characters #=> "uw1ep04lhs0c4d931n1jmrspprf5wrj85fefue0y7y6m56b6omquh7br7dhqijwlawejpl765nb1716idmp3xnfo85v349pzy2o9rir23y2qhflwr71c1585fnynguiphkjm8p0vktwitcsm16lny7jzp9t4drwav3qmhz4yjq4k04x14gl6p148hulyqioo72tf8nwrxxcclfypz2lc58lsibgfe5w5p0xv95peafjjmm2frkhdc6duoky0aha"
# @example Faker::Lorem.characters(number: 10) #=> "ang9cbhoa8"
# @example Faker::Lorem.characters(number: 10, min_alpha: 4) #=> "ang9cbhoa8"
# @example Faker::Lorem.characters(number: 10, min_alpha: 4, min_numeric: 1) #=> "ang9cbhoa8"
# @example
# Faker::Lorem.characters #=> "uw1ep04lhs0c4d931n1jmrspprf5w..."
# Faker::Lorem.characters(number: 10) #=> "ang9cbhoa8"
# Faker::Lorem.characters(number: 10, min_alpha: 4) #=> "ang9cbhoa8"
# Faker::Lorem.characters(number: 10, min_alpha: 4, min_numeric: 1) #=> "ang9cbhoa8"
#
# @faker.version 2.1.3
def characters(legacy_number = NOT_GIVEN, number: 255, min_alpha: 0, min_numeric: 0)
Expand Down

0 comments on commit 100a035

Please sign in to comment.