Class: Ikra::Translator::CommandTranslator::CommandTranslationResult
- Defined in:
- lib/translator/commands/command_translator.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#execution ⇒ Object
readonly
Source code that performs the computation of this command for one thread.
-
#result ⇒ Object
readonly
Source code that returns the result of the computation.
Instance Method Summary collapse
-
#initialize(execution: "", result:, command:) ⇒ CommandTranslationResult
constructor
A new instance of CommandTranslationResult.
- #result_type ⇒ Object
Constructor Details
#initialize(execution: "", result:, command:) ⇒ CommandTranslationResult
Returns a new instance of CommandTranslationResult.
31 32 33 34 35 |
# File 'lib/translator/commands/command_translator.rb', line 31 def initialize(execution: "", result:, command:) @execution = execution @command = command @result = result; end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
29 30 31 |
# File 'lib/translator/commands/command_translator.rb', line 29 def command @command end |
#execution ⇒ Object (readonly)
Source code that performs the computation of this command for one thread. May consist of multiple statement. Optional.
22 23 24 |
# File 'lib/translator/commands/command_translator.rb', line 22 def execution @execution end |
#result ⇒ Object (readonly)
Source code that returns the result of the computation. If the computation can be expressed in a single expression, this string can contain the entire computation and ‘execution` should then be empty.
27 28 29 |
# File 'lib/translator/commands/command_translator.rb', line 27 def result @result end |
Instance Method Details
#result_type ⇒ Object
37 38 39 |
# File 'lib/translator/commands/command_translator.rb', line 37 def result_type return command.result_type end |