Sha256: 082b38cd378c4b31faaf36fdb53ee033d8d6ef20d30527fda8a83b82859faf50

Contents?: true

Size: 730 Bytes

Versions: 231

Compression:

Stored size: 730 Bytes

Contents

begin
  require 'ffi/struct_generator'
  require 'ffi/const_generator'
  require 'ffi/generator'
rescue LoadError
  # from Rakefile
  require 'lib/ffi/struct_generator'
  require 'lib/ffi/const_generator'
  require 'lib/ffi/generator'
end

require 'rake'
require 'rake/tasklib'
require 'tempfile'

##
# Rake task that calculates C structs for FFI::Struct.

# @private
class FFI::Generator::Task < Rake::TaskLib

  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.options.trace

        FFI::Generator.new ffi_name, rb_name
      end
    end
  end

end

Version data entries

231 entries across 173 versions & 29 rubygems

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/lib/ffi/tools/generator_task.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/ffi-1.9.18/lib/ffi/tools/generator_task.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.10.0/lib/ffi/tools/generator_task.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/lib/ffi/tools/generator_task.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/ffi-1.10.0/lib/ffi/tools/generator_task.rb
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/ffi-1.9.25/lib/ffi/tools/generator_task.rb
tdiary-5.0.13 vendor/bundle/gems/ffi-1.10.0/lib/ffi/tools/generator_task.rb
approveapi-1.0.8 vendor/bundle/ruby/2.6.0/gems/ffi-1.10.0/lib/ffi/tools/generator_task.rb
tdiary-5.0.12.1 vendor/bundle/gems/ffi-1.10.0/lib/ffi/tools/generator_task.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.10.0/lib/ffi/tools/generator_task.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.6.0/gems/ffi-1.10.0/lib/ffi/tools/generator_task.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/lib/ffi/tools/generator_task.rb
approveapi-1.0.5 vendor/bundle/ruby/2.6.0/gems/ffi-1.10.0/lib/ffi/tools/generator_task.rb
alimentos-alu0100945645-0.1.0 vendor/bundle/ruby/2.3.0/gems/ffi-1.9.25/lib/ffi/tools/generator_task.rb
alimentos-alu0100945645-1.0.0 vendor/bundle/ruby/2.3.0/gems/ffi-1.9.25/lib/ffi/tools/generator_task.rb
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.10.0/lib/ffi/tools/generator_task.rb
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/lib/ffi/tools/generator_task.rb
ffi-1.10.0-x64-mingw32 lib/ffi/tools/generator_task.rb
ffi-1.10.0-x86-mingw32 lib/ffi/tools/generator_task.rb
ffi-1.10.0 lib/ffi/tools/generator_task.rb