### Home Classes Methods

### In Files

- lib/ffi/struct.rb

### Parent

StructByReference

### Methods

- ::new
- #from_native

### Files

- Makefile
- LICENSE
- compile
- configure
- depcomp
- stamp-vti
- install-sh
- libtool-version
- mdate-sh
- missing

### Class/Module Index

Quicksearch

- FFI
- FFI::ArrayType
- FFI::AutoPointer
- FFI::AutoPointer::CallableReleaser
- FFI::AutoPointer::DefaultReleaser
- FFI::AutoPointer::Releaser
- FFI::ConstGenerator
- FFI::ConstGenerator::Constant
- FFI::DynamicLibrary
- FFI::DynamicLibrary::Symbol
- FFI::Enum
- FFI::Enums
- FFI::Function
- FFI::Generator
- FFI::Generator::Task
- FFI::IO
- FFI::ManagedStruct
- FFI::Platform
- FFI::PlatformError
- FFI::Pointer
- FFI::StrPtrConverter
- FFI::Struct
- FFI::Struct::InlineArray
- FFI::Struct::ManagedStructConverter
- FFI::StructByReference
- FFI::StructByValue
- FFI::StructGenerator
- FFI::StructGenerator::Field
- FFI::StructLayout
- FFI::StructLayout::Enum
- FFI::StructLayout::InnerStruct
- FFI::StructLayout::Mapped
- FFI::StructLayoutBuilder
- FFI::TypesGenerator
- FFI::Union
- FFI::VariadicInvoker

No matching classes.

# FFI::Struct::ManagedStructConverter

### Public Class Methods

new(struct_class) click to toggle source

@param [Struct] struct_class

    # File lib/ffi/struct.rb, line 210
    def initialize(struct_class)
      super(struct_class)

      raise NoMethodError, "release() not implemented for class #{struct_class}" unless struct_class.respond_to? :release
      @method = struct_class.method(:release)
    end

### Public Instance Methods

from_native(ptr, ctx) click to toggle source

@param [Pointer] ptr @param [nil] ctx @return [Struct]

    # File lib/ffi/struct.rb, line 220
    def from_native(ptr, ctx)
      struct_class.new(AutoPointer.new(ptr, @method))
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.