Module: BlocklyInterpreter::ExtensionBlocks::SwitchBlock::DSLMethods

Defined in:
lib/blockly_interpreter/extension_blocks/switch_block.rb

Defined Under Namespace

Classes: SwitchBlockBuilder

Instance Method Summary collapse

Instance Method Details

#controls_switch(&proc) ⇒ Object



101
102
103
104
105
# File 'lib/blockly_interpreter/extension_blocks/switch_block.rb', line 101

def controls_switch(&proc)
  @blocks << BlocklyInterpreter::ExtensionBlocks::SwitchBlock::DSLMethods::SwitchBlockBuilder.new("controls_switch").tap do |builder|
    builder.instance_exec(&proc)
  end
end