Sha256: 6e72be2472bd6becd782eb9b77c059f73b4b286dd6238f5b1268659776880c80

Contents?: true

Size: 895 Bytes

Versions: 7064

Compression:

Stored size: 895 Bytes

Contents

require 'ffi/tools/generator'
require 'rake'
require 'rake/tasklib'

##
# Add Rake tasks that generate files with C structs for FFI::Struct and C constants.
#
# @example a simple example for your Rakefile
#   require "ffi/tools/generator_task"
#   # Add a task to generate my_object.rb out of my_object.rb.ffi
#   FFI::Generator::Task.new ["my_object.rb"], cflags: "-I/usr/local/mylibrary"
#
# The generated files are also added to the 'clear' task.
#
# @see FFI::Generator for a description of the file content
class FFI::Generator::Task < Rake::TaskLib

  def initialize(rb_names, options={})
    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, options
      end
    end
  end

end

Version data entries

7,064 entries across 7,057 versions & 41 rubygems

Version Path
cybrid_api_bank_ruby-0.123.149 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_id_ruby-0.123.149 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_organization_ruby-0.123.149 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_bank_ruby-0.123.148 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_id_ruby-0.123.148 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_organization_ruby-0.123.148 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_bank_ruby-0.123.147 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_organization_ruby-0.123.147 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_id_ruby-0.123.147 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
ory-client-1.16.2 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.1/lib/ffi/tools/generator_task.rb
talon_one-7.0.0 .github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/tools/generator_task.rb
cybrid_api_bank_ruby-0.123.145 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_organization_ruby-0.123.145 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_id_ruby-0.123.145 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_bank_ruby-0.123.144 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_id_ruby-0.123.144 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
cybrid_api_organization_ruby-0.123.144 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb
ory-client-1.16.1 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.1/lib/ffi/tools/generator_task.rb
ory-client-1.16.0 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.1/lib/ffi/tools/generator_task.rb
cybrid_api_bank_ruby-0.123.143 vendor/bundle/ruby/3.3.0/gems/ffi-1.17.1-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb