Class: Rake::BaseExtensionTask
- Inherits:
-
TaskLib
- Object
- TaskLib
- Rake::BaseExtensionTask
- Defined in:
- lib/rake/baseextensiontask.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#config_options ⇒ Object
Returns the value of attribute config_options.
-
#ext_dir ⇒ Object
Returns the value of attribute ext_dir.
-
#extra_options ⇒ Object
Returns the value of attribute extra_options.
-
#gem_spec ⇒ Object
Returns the value of attribute gem_spec.
-
#lib_dir ⇒ Object
Returns the value of attribute lib_dir.
-
#name ⇒ Object
Returns the value of attribute name.
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#source_pattern ⇒ Object
Returns the value of attribute source_pattern.
-
#tmp_dir ⇒ Object
Returns the value of attribute tmp_dir.
Instance Method Summary collapse
- #define ⇒ Object
- #init(name = nil, gem_spec = nil) ⇒ Object
-
#initialize(name = nil, gem_spec = nil) {|_self| ... } ⇒ BaseExtensionTask
constructor
A new instance of BaseExtensionTask.
Constructor Details
#initialize(name = nil, gem_spec = nil) {|_self| ... } ⇒ BaseExtensionTask
Returns a new instance of BaseExtensionTask.
33 34 35 36 37 |
# File 'lib/rake/baseextensiontask.rb', line 33 def initialize(name = nil, gem_spec = nil) init(name, gem_spec) yield self if block_given? define end |
Instance Attribute Details
#config_options ⇒ Object
Returns the value of attribute config_options.
25 26 27 |
# File 'lib/rake/baseextensiontask.rb', line 25 def @config_options end |
#ext_dir ⇒ Object
Returns the value of attribute ext_dir.
22 23 24 |
# File 'lib/rake/baseextensiontask.rb', line 22 def ext_dir @ext_dir end |
#extra_options ⇒ Object
Returns the value of attribute extra_options.
27 28 29 |
# File 'lib/rake/baseextensiontask.rb', line 27 def @extra_options end |
#gem_spec ⇒ Object
Returns the value of attribute gem_spec.
20 21 22 |
# File 'lib/rake/baseextensiontask.rb', line 20 def gem_spec @gem_spec end |
#lib_dir ⇒ Object
Returns the value of attribute lib_dir.
23 24 25 |
# File 'lib/rake/baseextensiontask.rb', line 23 def lib_dir @lib_dir end |
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/rake/baseextensiontask.rb', line 19 def name @name end |
#platform ⇒ Object
Returns the value of attribute platform.
24 25 26 |
# File 'lib/rake/baseextensiontask.rb', line 24 def platform @platform end |
#source_pattern ⇒ Object
Returns the value of attribute source_pattern.
26 27 28 |
# File 'lib/rake/baseextensiontask.rb', line 26 def source_pattern @source_pattern end |
#tmp_dir ⇒ Object
Returns the value of attribute tmp_dir.
21 22 23 |
# File 'lib/rake/baseextensiontask.rb', line 21 def tmp_dir @tmp_dir end |
Instance Method Details
#define ⇒ Object
49 50 51 52 53 |
# File 'lib/rake/baseextensiontask.rb', line 49 def define fail "Extension name must be provided." if @name.nil? define_compile_tasks end |
#init(name = nil, gem_spec = nil) ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/rake/baseextensiontask.rb', line 39 def init(name = nil, gem_spec = nil) @name = name @gem_spec = gem_spec @tmp_dir = 'tmp' @ext_dir = "ext/#{@name}" @lib_dir = 'lib' @config_options = [] @extra_options = ARGV.select { |i| i =~ /\A--?/ } end |