Class: CIAT::Processors::Java
- Inherits:
-
Object
- Object
- CIAT::Processors::Java
- Defined in:
- lib/ciat/processors/java.rb
Overview
Processor class for compilers and interpreters implemented in Java (or on the JVM).
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#kind ⇒ Object
Returns the value of attribute kind.
Instance Method Summary collapse
-
#describe ⇒ Object
Provides a description of the processor.
- #executable ⇒ Object
-
#initialize(classpath, interpreter_class) {|_self| ... } ⇒ Java
constructor
Creates a Java executor.
Constructor Details
#initialize(classpath, interpreter_class) {|_self| ... } ⇒ Java
Creates a Java executor.
11 12 13 14 15 16 17 |
# File 'lib/ciat/processors/java.rb', line 11 def initialize(classpath, interpreter_class) @classpath = classpath @interpreter_class = interpreter_class self.kind = CIAT::Processors::Interpreter.new self.description = "in-Java interpreter" yield self if block_given? end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/ciat/processors/java.rb', line 8 def description @description end |
#kind ⇒ Object
Returns the value of attribute kind.
7 8 9 |
# File 'lib/ciat/processors/java.rb', line 7 def kind @kind end |
Instance Method Details
#describe ⇒ Object
Provides a description of the processor.
20 21 22 |
# File 'lib/ciat/processors/java.rb', line 20 def describe @description end |
#executable ⇒ Object
24 25 26 |
# File 'lib/ciat/processors/java.rb', line 24 def executable "java -cp '#{@classpath}' #{@interpreter_class}" end |