module ActiveSupport::Multibyte
Общедоступные методы класса
# File activesupport/lib/active_support/multibyte.rb, line 23 def self.proxy_class @proxy_class ||= ActiveSupport::Multibyte::Chars end
Возвращает текущий класс прокси.
# File activesupport/lib/active_support/multibyte.rb, line 14
def self.proxy_class=(klass)
ActiveSupport.deprecator.warn(
"ActiveSupport::Multibyte.proxy_class= is deprecated and will be removed in Rails 8.2. " \
"Use normal string methods instead."
)
@proxy_class = klass
end Класс прокси, возвращаемый при вызове mb_chars. С помощью этого метода доступа можно настроить собственный класс прокси, чтобы поддерживать другие кодировки. Пример того, как это сделать, см. в реализации ActiveSupport::Multibyte::Chars.
ActiveSupport::Multibyte.proxy_class = CharsForUTF32
© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.