Class: Rscons::Builders::SimpleBuilder
- Inherits:
-
Rscons::Builder
- Object
- Rscons::Builder
- Rscons::Builders::SimpleBuilder
- Defined in:
- lib/rscons/builders/simple_builder.rb
Overview
A Generic builder which has its operation is defined at instantiation.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
User-provided builder name.
Attributes inherited from Rscons::Builder
#build_step, #cache, #env, #preferred_ld, #side_effects, #sources, #target, #vars
Instance Method Summary collapse
-
#initialize(name, options, &run_proc) ⇒ SimpleBuilder
constructor
Create an instance of the Builder to build a target.
-
#run(*args) ⇒ Object
Run the builder to produce a build target.
Methods inherited from Rscons::Builder
#depends, extra_path, #finalize_command, name, #nop?, #print_run_message, #produces, #register_command, #standard_command, #wait_for
Constructor Details
#initialize(name, options, &run_proc) ⇒ SimpleBuilder
Create an instance of the Builder to build a target.
27 28 29 30 31 |
# File 'lib/rscons/builders/simple_builder.rb', line 27 def initialize(name, , &run_proc) @name = name super() @run_proc = run_proc end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns User-provided builder name.
8 9 10 |
# File 'lib/rscons/builders/simple_builder.rb', line 8 def name @name end |
Instance Method Details
#run(*args) ⇒ Object
Run the builder to produce a build target.
Method signature described by Rscons::Builder#run.
36 37 38 |
# File 'lib/rscons/builders/simple_builder.rb', line 36 def run(*args) instance_exec(*args, &@run_proc) end |