class ICU::NumberFormatting::BaseFormatter
Public Instance Methods
set_attributes(options)
click to toggle source
# File lib/ffi-icu/number_formatting.rb, line 42 def set_attributes(options) options.each { |key, value| Lib.unum_set_attribute(@f, key, value) } self end
Private Instance Methods
make_formatter(type, locale)
click to toggle source
# File lib/ffi-icu/number_formatting.rb, line 49 def make_formatter(type, locale) ptr = Lib.check_error { | error| Lib.unum_open(type, FFI::MemoryPointer.new(4), 0, locale, FFI::MemoryPointer.new(4), error) } FFI::AutoPointer.new(ptr, Lib.method(:unum_close)) end