Object
This class hold constants for {ConstGenerator}
@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}.
# File lib/ffi/tools/const_generator.rb, line 196 def initialize(name, format, cast, ruby_name = nil, converter=nil) @name = name @format = format @cast = cast @ruby_name = ruby_name @converter = converter @value = nil end
Return constant value (converted if a converter was defined). @return constant value.
# File lib/ffi/tools/const_generator.rb, line 207 def converted_value if @converter @converter.call(@value) else @value end end
Generated with the Darkfish Rdoc Generator 2.