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
- #addTasks(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
#addTasks(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 addTasks(artifact) if (artifact.instance_of?(Exe)) then addExeTasks(artifact) elsif (artifact.instance_of?(SourceLib)) then addSourceLibTasks(artifact) elsif (artifact.instance_of?(ObjectFile)) then addObjectTasks(artifact) elsif (artifact.instance_of?(Framework)) then addFrameworkTasks(artifact) elsif (artifact.instance_of?(BinaryLib)) then addBinaryLibTasks(artifact) elsif (artifact.instance_of?(SharedLib)) then addSharedLibTasks(artifact) else raise "unknown type " + artifact.to_s end end |