Class: RustyJSONSchema::NodesArray
- Inherits:
-
FFI::ManagedStruct
- Object
- FFI::ManagedStruct
- RustyJSONSchema::NodesArray
- Defined in:
- lib/rusty_json_schema/nodes_array.rb
Overview
Struct representing list of errors returned from our wrapper library. Use ManagedStruct in order to properly release nested strings which would otherwise leak and pollute the memory.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.release(ptr) ⇒ Object
20 21 22 |
# File 'lib/rusty_json_schema/nodes_array.rb', line 20 def self.release(ptr) Binding.free_array(ptr) end |
Instance Method Details
#to_a ⇒ Object
16 17 18 |
# File 'lib/rusty_json_schema/nodes_array.rb', line 16 def to_a self[:data].get_array_of_string(0, self[:len]).compact end |