Class: ICU::Lib::VersionInfo

Inherits:
FFI::MemoryPointer
  • Object
show all
Extended by:
FFI::DataConverter
Defined in:
lib/ffi-icu/lib.rb

Constant Summary collapse

MaxLength =
4
MaxStringLength =
20

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeVersionInfo

Returns a new instance of VersionInfo.



163
164
165
# File 'lib/ffi-icu/lib.rb', line 163

def initialize
  super :uint8, MaxLength
end

Class Method Details

.native_typeObject



159
160
161
# File 'lib/ffi-icu/lib.rb', line 159

def self.native_type
  FFI::Type::POINTER
end

Instance Method Details

#to_aObject



167
168
169
# File 'lib/ffi-icu/lib.rb', line 167

def to_a
  read_array_of_uint8(MaxLength)
end

#to_sObject



171
172
173
174
175
# File 'lib/ffi-icu/lib.rb', line 171

def to_s
  buffer = FFI::MemoryPointer.new(:char, MaxStringLength)
  Lib.u_versionToString(self, buffer)
  buffer.read_string_to_null
end