class FFI::StructGenerator::Field
A field in a Struct
.
Attributes
Public Class Methods
# File lib/ffi/tools/struct_generator.rb, line 173 def initialize(name, type) @name = name @type = type @offset = nil @size = nil end
Public Instance Methods
# File lib/ffi/tools/struct_generator.rb, line 180 def offset=(o) @offset = o end
# File lib/ffi/tools/struct_generator.rb, line 184 def to_config(name) buf = [] buf << "rbx.platform.#{name}.#{@name}.offset = #{@offset}" buf << "rbx.platform.#{name}.#{@name}.size = #{@size}" buf << "rbx.platform.#{name}.#{@name}.type = #{@type}" if @type buf end