module Faker::Config
Attributes
default_locale[W]
Public Class Methods
locale()
click to toggle source
# File lib/faker.rb, line 23 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] || @default_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 19 def locale=(new_locale) Thread.current[:faker_config_locale] = new_locale end
own_locale()
click to toggle source
# File lib/faker.rb, line 28 def own_locale Thread.current[:faker_config_locale] end
random()
click to toggle source
# File lib/faker.rb, line 36 def random Thread.current[:faker_config_random] || Random end
random=(new_random)
click to toggle source
# File lib/faker.rb, line 32 def random=(new_random) Thread.current[:faker_config_random] = new_random end