Class: TestInterpreter
- Inherits:
-
BlocklyInterpreter::Interpreter
- Object
- BlocklyInterpreter::Interpreter
- TestInterpreter
- Defined in:
- lib/blockly_interpreter/blockly_interpreter_test_helper.rb
Defined Under Namespace
Classes: ExecutionContext
Instance Attribute Summary
Attributes inherited from BlocklyInterpreter::Interpreter
Instance Method Summary collapse
- #build_execution_context ⇒ Object
- #content ⇒ Object
-
#initialize(program, variables = {}) ⇒ TestInterpreter
constructor
A new instance of TestInterpreter.
Methods inherited from BlocklyInterpreter::Interpreter
Constructor Details
#initialize(program, variables = {}) ⇒ TestInterpreter
Returns a new instance of TestInterpreter.
68 69 70 71 |
# File 'lib/blockly_interpreter/blockly_interpreter_test_helper.rb', line 68 def initialize(program, variables = {}) super(program) @variables = variables end |
Instance Method Details
#build_execution_context ⇒ Object
77 78 79 |
# File 'lib/blockly_interpreter/blockly_interpreter_test_helper.rb', line 77 def build_execution_context TestInterpreter::ExecutionContext.new(self, @variables) end |
#content ⇒ Object
73 74 75 |
# File 'lib/blockly_interpreter/blockly_interpreter_test_helper.rb', line 73 def content execute.content end |