module Faker::Config

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/faker.rbs

module Faker::Config
  def locale=: (nil new_locale) -> nil
  def own_locale: () -> Symbol
  def random: () -> Class
end

def locale

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

def locale=(new_locale)

Experimental RBS support (using type sampling data from the type_fusion project).

def locale=: (nil new_locale) -> nil

This signature was generated using 1 sample from 1 application.

def locale=(new_locale)
  Thread.current[:faker_config_locale] = new_locale
end

def own_locale

Experimental RBS support (using type sampling data from the type_fusion project).

def own_locale: () -> Symbol

This signature was generated using 1 sample from 1 application.

def own_locale
  Thread.current[:faker_config_locale]
end

def random

Experimental RBS support (using type sampling data from the type_fusion project).

def random: () -> Class

This signature was generated using 1 sample from 1 application.

def random
  Thread.current[:faker_config_random] || Random
end

def random=(new_random)

def random=(new_random)
  Thread.current[:faker_config_random] = new_random
end