module Faker::Config
Public Class Methods
locale()
click to toggle source
# File lib/faker.rb, line 21 def locale # Because I18n.locale defaults to :en, if we don't have :en in our available_locales, errors will happen Thread.current[:faker_config_locale] || (I18n.available_locales.include?(I18n.locale) ? I18n.locale : I18n.available_locales.first) end
locale=(new_locale)
click to toggle source
# File lib/faker.rb, line 17 def locale=(new_locale) Thread.current[:faker_config_locale] = new_locale end
own_locale()
click to toggle source
# File lib/faker.rb, line 26 def own_locale Thread.current[:faker_config_locale] end
random()
click to toggle source
# File lib/faker.rb, line 34 def random Thread.current[:faker_config_random] || Random end
random=(new_random)
click to toggle source
# File lib/faker.rb, line 30 def random=(new_random) Thread.current[:faker_config_random] = new_random end