Module: BlocklyInterpreter::CoreBlocks::TextJoinBlock::DSLMethods

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

Defined Under Namespace

Classes: TextJoinBlockBuilder

Instance Method Summary collapse

Instance Method Details

#text_join(*strings, &proc) ⇒ Object



40
41
42
43
44
45
46
47
48
# File 'lib/blockly_interpreter/core_blocks/text_join_block.rb', line 40

def text_join(*strings, &proc)
  @blocks << BlocklyInterpreter::CoreBlocks::TextJoinBlock::DSLMethods::TextJoinBlockBuilder.new('text_join').tap do |builder|
    strings.each do |string|
      builder.item string
    end

    builder.instance_exec(&proc) if proc
  end
end