Module: BlocklyInterpreter::CoreBlocks::LogicalOperatorBlock::DSLMethods

Defined in:
lib/blockly_interpreter/core_blocks/logical_operator_block.rb

Instance Method Summary collapse

Instance Method Details

#logic_operation(op, a = nil, b = nil, &proc) ⇒ Object



16
17
18
19
20
# File 'lib/blockly_interpreter/core_blocks/logical_operator_block.rb', line 16

def logic_operation(op, a = nil, b = nil, &proc)
  @blocks << BlocklyInterpreter::DSL::BinaryOperationBlockBuilder.new("logic_operation", op, a, b).tap do |builder|
    builder.instance_exec(&proc) if block_given?
  end
end