Class: Compiler
- Inherits:
-
Object
- Object
- Compiler
- Defined in:
- lib/rakepp/compiler.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#compileflags ⇒ Object
readonly
Returns the value of attribute compileflags.
-
#targetDir ⇒ Object
readonly
Returns the value of attribute targetDir.
Instance Method Summary collapse
- #add_tasks(artifact) ⇒ Object
-
#initialize(targetDir, defines, compileflags) ⇒ Compiler
constructor
A new instance of Compiler.
Constructor Details
#initialize(targetDir, defines, compileflags) ⇒ Compiler
Returns a new instance of Compiler.
4 5 6 7 8 |
# File 'lib/rakepp/compiler.rb', line 4 def initialize(targetDir, defines, compileflags) @targetDir = targetDir @defines = defines @compileflags = compileflags end |
Instance Attribute Details
#compileflags ⇒ Object (readonly)
Returns the value of attribute compileflags.
2 3 4 |
# File 'lib/rakepp/compiler.rb', line 2 def compileflags @compileflags end |
#targetDir ⇒ Object (readonly)
Returns the value of attribute targetDir.
2 3 4 |
# File 'lib/rakepp/compiler.rb', line 2 def targetDir @targetDir end |
Instance Method Details
#add_tasks(artifact) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rakepp/compiler.rb', line 10 def add_tasks(artifact) if (artifact.instance_of?(Exe)) then add_exe_tasks(artifact) elsif (artifact.instance_of?(SourceLib)) then add_source_lib_tasks(artifact) elsif (artifact.instance_of?(ObjectFile)) then add_object_tasks(artifact) elsif (artifact.instance_of?(Framework)) then add_framework_tasks(artifact) elsif (artifact.instance_of?(BinaryLib)) then add_binary_lib_tasks(artifact) elsif (artifact.instance_of?(SharedLib)) then add_shared_lib_tasks(artifact) else raise "unknown type " + artifact.to_s end end |