Class: Aws::Crt::Native::PropertyList
- Inherits:
-
FFI::ManagedStruct
- Object
- FFI::ManagedStruct
- Aws::Crt::Native::PropertyList
- Defined in:
- lib/aws-crt/native.rb
Overview
Managed PropertyList Struct (for outputs)
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#props ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/aws-crt/native.rb', line 31 def props return nil if to_ptr.null? return {} unless (self[:len]).positive? out = {} names_p = self[:names].get_array_of_pointer(0, self[:len]) values_p = self[:values].get_array_of_pointer(0, self[:len]) names_p.zip(values_p).each do |name_p, value_p| out[name_p.read_string.dup] = value_p.read_string.dup end out end |