### Home Classes Methods

### In Files

- lib/ffi/struct.rb

### Parent

Field

### Methods

- #get
- #put

### Files

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

### Class/Module Index

Quicksearch

- FFI
- FFI::AutoPointer
- FFI::AutoPointer::CallableReleaser
- FFI::AutoPointer::DefaultReleaser
- FFI::AutoPointer::Releaser
- FFI::Buffer
- FFI::ConstGenerator
- FFI::ConstGenerator::Constant
- FFI::DataConverter
- FFI::Enum
- FFI::Enums
- FFI::Generator
- FFI::Generator::Task
- FFI::IO
- FFI::Library
- FFI::ManagedStruct
- FFI::MemoryPointer
- FFI::NotFoundError
- FFI::Platform
- FFI::PlatformError
- FFI::Pointer
- FFI::StrPtrConverter
- FFI::Struct
- FFI::Struct::ManagedStructConverter
- 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::StructLayout::InnerStruct

### Public Instance Methods

get(ptr) click to toggle source

    # File lib/ffi/struct.rb, line 63
    def get(ptr)
      type.struct_class.new(ptr.slice(self.offset, self.size))
    end

put(ptr, value) click to toggle source

    # File lib/ffi/struct.rb, line 67
    def put(ptr, value)
      raise TypeError, "wrong value type (expected #{type.struct_class}" unless value.is_a?(type.struct_class)
      ptr.slice(self.offset, self.size).__copy_from__(value.pointer, self.size)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.