Class: FFI::Generator::Task

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/generator/generatortask.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) {|_self| ... } ⇒ Task

Returns a new instance of Task.

Yields:

  • (_self)

Yield Parameters:



7
8
9
10
11
12
13
14
15
16
# File 'lib/generator/generatortask.rb', line 7

def initialize(options = {}, &blk)
  @options = { :input_fn => '*.i', :output_dir => 'generated/' }.merge(options)
  @input_fn = @options[:input_fn]
  @output_dir = @options[:output_dir]
  yield self if block_given?
  namespace 'ffi' do
    define_generate_task
    define_clean_task
  end
end

Instance Attribute Details

#input_fnObject

Returns the value of attribute input_fn.



6
7
8
# File 'lib/generator/generatortask.rb', line 6

def input_fn
  @input_fn
end

#output_dirObject

Returns the value of attribute output_dir.



6
7
8
# File 'lib/generator/generatortask.rb', line 6

def output_dir
  @output_dir
end