Class: FFI::Generator::Task
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- FFI::Generator::Task
- Defined in:
- lib/ffi/tools/generator_task.rb
Overview
Rake task that calculates C structs for FFI::Struct.
Instance Method Summary collapse
-
#initialize(rb_names) ⇒ Task
constructor
A new instance of Task.
Constructor Details
#initialize(rb_names) ⇒ Task
Returns a new instance of Task.
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ffi/tools/generator_task.rb', line 21 def initialize(rb_names) task :clean do rm_f rb_names end rb_names.each do |rb_name| ffi_name = "#{rb_name}.ffi" file rb_name => ffi_name do |t| puts "Generating #{rb_name}..." if Rake.application..trace FFI::Generator.new ffi_name, rb_name end end end |