Class: BlocklyInterpreter::ConsoleInterpreter

Inherits:
Interpreter
  • Object
show all
Defined in:
lib/blockly_interpreter/console_interpreter.rb

Defined Under Namespace

Classes: ConsolePrintBlock

Instance Attribute Summary

Attributes inherited from Interpreter

#debug_messages, #program

Instance Method Summary collapse

Methods inherited from Interpreter

#add_debug_messages, #build_execution_context, #execute, #initialize

Constructor Details

This class inherits a constructor from BlocklyInterpreter::Interpreter

Instance Method Details

#block_class_for_element(element) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/blockly_interpreter/console_interpreter.rb', line 8

def block_class_for_element(element)
  case element['type']
  when 'console_print' then ConsolePrintBlock
  else
    super(element)
  end
end