Class: Faker::String
Constant Summary
Constants inherited from Base
Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters
Class Method Summary collapse
-
.random(legacy_length = NOT_GIVEN, length: 32) ⇒ String
Produces a random UTF-8 string with optional nested length selectors.
Methods inherited from Base
bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, translate, unique, with_locale
Class Method Details
.random(legacy_length = NOT_GIVEN, length: 32) ⇒ String
Produces a random UTF-8 string with optional nested length selectors.
22 23 24 25 26 27 28 |
# File 'lib/faker/default/string.rb', line 22 def random(legacy_length = NOT_GIVEN, length: 32) warn_for_deprecated_arguments do |keywords| keywords << :length if legacy_length != NOT_GIVEN end utf8string select_a length end |