Class: FFI::Generator::Callback

Inherits:
Type
  • Object
show all
Defined in:
lib/generator/generator.rb

Instance Attribute Summary

Attributes inherited from Node

#symname

Instance Method Summary collapse

Methods inherited from Type

#initialize

Methods inherited from Node

#get_attr, #initialize

Constructor Details

This class inherits a constructor from FFI::Generator::Type

Instance Method Details

#to_sObject



262
263
264
265
266
267
# File 'lib/generator/generator.rb', line 262

def to_s
  params = get_params.inject([]) do |array, type|
    array << (type == 'void' ? '' : Type.new(:statement => type).to_s)
  end
  @indent_str + "callback(:#{@symname}, [ #{params.join(', ')} ], #{get_rtype})"
end