Class | FFI::ConstGenerator |
In: |
lib/ffi/tools/const_generator.rb
lib/ffi/tools/const_generator.rb lib/ffi/tools/const_generator.rb |
Parent: | Object |
ConstGenerator turns C constants into ruby values.
constants | [R] | |
constants | [R] | |
constants | [R] |
Creates a new constant generator that uses prefix as a name, and an options hash.
The only option is :required, which if set to true raises an error if a constant you have requested was not found.
When passed a block, calculate is automatically called at the end of the block, otherwise you must call it yourself.
Creates a new constant generator that uses prefix as a name, and an options hash.
The only option is :required, which if set to true raises an error if a constant you have requested was not found.
When passed a block, calculate is automatically called at the end of the block, otherwise you must call it yourself.
Creates a new constant generator that uses prefix as a name, and an options hash.
The only option is :required, which if set to true raises an error if a constant you have requested was not found.
When passed a block, calculate is automatically called at the end of the block, otherwise you must call it yourself.
Request the value for C constant name. format is a printf format string to print the value out, and cast is a C cast for the value. ruby_name allows you to give the constant an alternate ruby name for to_ruby. converter or converter_proc allow you to convert the value from a string to the appropriate type for to_ruby.
Request the value for C constant name. format is a printf format string to print the value out, and cast is a C cast for the value. ruby_name allows you to give the constant an alternate ruby name for to_ruby. converter or converter_proc allow you to convert the value from a string to the appropriate type for to_ruby.
Request the value for C constant name. format is a printf format string to print the value out, and cast is a C cast for the value. ruby_name allows you to give the constant an alternate ruby name for to_ruby. converter or converter_proc allow you to convert the value from a string to the appropriate type for to_ruby.
Outputs values for discovered constants. If the constant‘s value was not discovered it is not omitted.
Outputs values for discovered constants. If the constant‘s value was not discovered it is not omitted.