Class: Ikra::Translator::InputTranslationResult

Inherits:
Object
  • Object
show all
Defined in:
lib/translator/input_translator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pre_execution: "", parameters:, override_block_parameters: nil, command_translation_result:) ⇒ InputTranslationResult

Returns a new instance of InputTranslationResult.



130
131
132
133
134
135
136
137
138
139
140
# File 'lib/translator/input_translator.rb', line 130

def initialize(
    pre_execution: "", 
    parameters:, 
    override_block_parameters: nil, 
    command_translation_result:)

    @pre_execution = pre_execution
    @parameters = parameters
    @override_block_parameters = override_block_parameters
    @command_translation_result = command_translation_result
end

Instance Attribute Details

#command_translation_resultObject (readonly)

Returns the value of attribute command_translation_result.



128
129
130
# File 'lib/translator/input_translator.rb', line 128

def command_translation_result
  @command_translation_result
end

#override_block_parametersObject (readonly)

Change (override) parameters of the block (to actually pass different parameters). This does not affect type inference.



126
127
128
# File 'lib/translator/input_translator.rb', line 126

def override_block_parameters
  @override_block_parameters
end

#parametersObject (readonly)

Parameter names and types of the block (for type inference)



122
123
124
# File 'lib/translator/input_translator.rb', line 122

def parameters
  @parameters
end

#pre_executionObject (readonly)

Code to be executed before the actual execution of the block begins (but inside the block function)



119
120
121
# File 'lib/translator/input_translator.rb', line 119

def pre_execution
  @pre_execution
end