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 class whose name and operation is defined at instantiation.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The name of this builder.
Instance Method Summary collapse
-
#initialize(name, &block) ⇒ SimpleBuilder
constructor
Create a new builder with the given name and action.
-
#run(target, sources, cache, env, vars) ⇒ String, false
Run the builder to produce a build target.
Methods inherited from Rscons::Builder
#create_build_target, #default_variables, #features, #finalize, #produces?, #setup, #standard_build, #standard_finalize, #standard_threaded_build
Constructor Details
#initialize(name, &block) ⇒ SimpleBuilder
Create a new builder with the given name and action.
18 19 20 21 |
# File 'lib/rscons/builders/simple_builder.rb', line 18 def initialize(name, &block) @name = name.to_s @block = block end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns The name of this builder.
9 10 11 |
# File 'lib/rscons/builders/simple_builder.rb', line 9 def name @name end |
Instance Method Details
#run(target, sources, cache, env, vars) ⇒ String, false
Run the builder to produce a build target.
33 34 35 |
# File 'lib/rscons/builders/simple_builder.rb', line 33 def run(target, sources, cache, env, vars) @block.call(target, sources, cache, env, vars) end |