Rice::Native¶
The Native
class wraps C++ functions, methods, attributes and procedures. There is one Native instance per wrapped native type.
Usage¶
native_functions = Registries.instance.natives.native_functions(klass).sort.group_by(&:name)
native_functions.each do |native_function|
native_function.parameters.map do |parameter|
puts native.name
end.join(", ")
end
Ruby API¶
Enums¶
The NativeKind
enum enables the ability to distinguish between different Native types.
It has the following values:
Function
Method
AttributeReader
AttributeWriter
Proc
Methods¶
name
- Returns the Ruby name of the wrapped function, method, attribute or prockind
- Returns the kind of the Native object. See the NativeKind Enum abovereturn_type
- Returns the Ruby return type of a function or method or attributesparameters
- Returns the parameters for a function or methodto_s
- Returns a human readable description of a Native instance