Class: Rdkafka::Metadata::CustomFFIStruct

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/rdkafka/metadata.rb

Instance Method Summary collapse

Instance Method Details

#to_hObject



73
74
75
76
77
78
79
80
# File 'lib/rdkafka/metadata.rb', line 73

def to_h
  members.each_with_object({}) do |mem, hsh|
    val = self.[](mem)
    next if val.is_a?(FFI::Pointer) || mem == :rd_kafka_resp_err

    hsh[mem] = self.[](mem)
  end
end