Method: Mongo::Crypt::Status#initialize
- Defined in:
- lib/mongo/crypt/status.rb
#initialize(pointer: nil) ⇒ Status
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Note:
When initializing a Status object with a pointer, it is
Create a new Status object
recommended that you use the #self.from_pointer method
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/mongo/crypt/status.rb', line 35 def initialize(pointer: nil) # If a pointer is passed in, this class is not responsible for # destroying that pointer and deallocating data. # # FFI::AutoPointer uses a custom release strategy to automatically free # the pointer once this object goes out of scope @status = pointer || FFI::AutoPointer.new( Binding.mongocrypt_status_new, Binding.method(:mongocrypt_status_destroy) ) end |