Class: BlocklyInterpreter::ExtensionBlocks::DebugMessageBlock

Inherits:
Block
  • Object
show all
Defined in:
lib/blockly_interpreter/extension_blocks/debug_message_block.rb

Defined Under Namespace

Modules: DSLMethods

Instance Attribute Summary

Attributes inherited from Block

#block_type, #comment, #comment_pinned, #fields, #is_shadow, #mutation, #next_block, #statements, #values, #x, #y

Instance Method Summary collapse

Methods inherited from Block

#each_block, #has_comment?, #has_position?, #initialize, #to_dsl, #to_xml, #to_xml_element, #value

Constructor Details

This class inherits a constructor from BlocklyInterpreter::Block

Instance Method Details

#execute_statement(execution_context) ⇒ Object



4
5
6
7
8
# File 'lib/blockly_interpreter/extension_blocks/debug_message_block.rb', line 4

def execute_statement(execution_context)
  message = values['MESSAGE'].value(execution_context)
  message = message.inspect unless message.is_a?(String)
  execution_context.add_debug_message message
end