class FFIDB::Exporters::Ruby
Code generator for the Ruby
programming language (using FFI).
Constants
- TYPE_MAP
Public Instance Methods
finish()
click to toggle source
# File lib/ffidb/exporters/ruby.rb, line 13 def finish puts self.render_template('ruby.erb') end
Protected Instance Methods
param_type(c_type)
click to toggle source
@param [Symbol, FFIDB::Type] c_type @return [String]
Calls superclass method
FFIDB::Exporter#param_type
# File lib/ffidb/exporters/ruby.rb, line 35 def param_type(c_type) case type = super(c_type) when Symbol then type.to_s # a typedef else ':' << type.to_s end end
struct_type(c_type)
click to toggle source
@param [Symbol, FFIDB::Type] c_type @return [String]
# File lib/ffidb/exporters/ruby.rb, line 22 def struct_type(c_type) case c_type when Symbol then c_type.to_s # a typedef else case when c_type.array? then [self.param_type(c_type.array_type), c_type.array_size].inspect else self.param_type(c_type) end end end