Module: Babosa::UTF8::ActiveSupportProxy

Extended by:
ActiveSupport::Multibyte::Unicode, ActiveSupportProxy
Included in:
ActiveSupportProxy
Defined in:
lib/babosa/utf8/active_support_proxy.rb

Overview

A UTF-8 proxy using Active Support's multibyte support.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.normalize_utf8(string) ⇒ Object


11
12
13
# File 'lib/babosa/utf8/active_support_proxy.rb', line 11

def self.normalize_utf8(string)
  normalize(string, :c)
end

Instance Method Details

#downcase(string) ⇒ Object


16
17
18
# File 'lib/babosa/utf8/active_support_proxy.rb', line 16

def downcase(string)
  ActiveSupport::Multibyte::Chars.new(string).downcase.to_s
end

#upcase(string) ⇒ Object


20
21
22
# File 'lib/babosa/utf8/active_support_proxy.rb', line 20

def upcase(string)
  ActiveSupport::Multibyte::Chars.new(string).upcase.to_s
end