Class | FFI::ConstGenerator::Constant
In: | lib/ffi/tools/const_generator.rb
Parent: | Object

This class hold constants for {ConstGenerator}

### Methods

converted_value new ruby_name to_ruby

### Attributes

cast | [R] |
format | [R] |
name | [R] |
value | [RW] |

### Public Class methods

new(name, format, cast, ruby_name = nil, converter=nil)

@param [to_s] name @param [String] format a printf format string to print the value out @param [String] cast a C cast for the value @param ruby_name alternate ruby name for {to_ruby} @param [call] converter convert the value from a string to the appropriate

     type for {#to_ruby}.

### Public Instance methods

converted_value()

Return constant value (converted if a `converter` was defined). @return constant value.

ruby_name()

get constant ruby name @return [String]

to_ruby()

Get an evaluable string from constant. @return [String]

[Validate]