Class: FFI::Generator::Function
- Defined in:
- lib/generator/generator.rb
Defined Under Namespace
Classes: Argument
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(params = { }) ⇒ Function
constructor
A new instance of Function.
- #to_s ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(params = { }) ⇒ Function
Returns a new instance of Function.
243 244 245 246 |
# File 'lib/generator/generator.rb', line 243 def initialize(params = { }) super @type = get_attr('type') end |
Instance Method Details
#to_s ⇒ Object
247 248 249 250 251 252 |
# File 'lib/generator/generator.rb', line 247 def to_s params = get_params(@node).inject([]) do |array, node| array << Argument.new(:node => node).to_s end.collect { |p| "#{p}" } @indent_str + "attach_function :#{@symname}, [ #{params.join(', ')} ], #{get_rvalue}" end |