class Proj::Strings
Attributes
strings[R]
Public Class Methods
new(pointer)
click to toggle source
# File lib/proj/strings.rb, line 11 def initialize(pointer) @strings = Array.new read_strings(pointer) Api.proj_string_list_destroy(pointer) end
Private Instance Methods
read_strings(pointer)
click to toggle source
# File lib/proj/strings.rb, line 19 def read_strings(pointer) unless pointer.null? loop do string_ptr = pointer.read_pointer break if string_ptr.null? @strings << string_ptr.read_string_to_null pointer += FFI::Pointer::SIZE end end end