Module: BlocklyInterpreter::CoreBlocks::ArithmeticOperatorBlock::DSLMethods
- Defined in:
- lib/blockly_interpreter/core_blocks/arithmetic_operator_block.rb
Instance Method Summary collapse
Instance Method Details
#math_arithmetic(op, a = nil, b = nil, &proc) ⇒ Object
18 19 20 21 22 |
# File 'lib/blockly_interpreter/core_blocks/arithmetic_operator_block.rb', line 18 def math_arithmetic(op, a = nil, b = nil, &proc) @blocks << BlocklyInterpreter::DSL::BinaryOperationBlockBuilder.new("math_arithmetic", op, a, b).tap do |builder| builder.instance_exec(&proc) if block_given? end end |