Class: FFI::Generator::Callback
- Defined in:
- lib/generator/function.rb
Constant Summary
Constants inherited from Type
Type::ArrayRE, Type::ArraySizeRE
Instance Attribute Summary
Attributes inherited from Type
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(params = { }) ⇒ Callback
constructor
A new instance of Callback.
- #to_s ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(params = { }) ⇒ Callback
Returns a new instance of Callback.
37 38 39 40 |
# File 'lib/generator/function.rb', line 37 def initialize(params = { }) super(params) @inline = true if params[:inline] == true end |
Instance Method Details
#to_s ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/generator/function.rb', line 41 def to_s unless @inline @indent_str + "callback(:#{@symname}, [ #{get_params.join(', ')} ], #{get_rtype})" else @indent_str + "callback([ #{get_params.join(', ')} ], #{get_rtype})" end end |