Class: BlocklyInterpreter::CoreBlocks::RepeatTimesBlock::DSLMethods::RepeatBlockBuilder

Inherits:
DSL::BlockBuilder
  • Object
show all
Defined in:
lib/blockly_interpreter/core_blocks/repeat_times_block.rb

Instance Attribute Summary

Attributes inherited from DSL::BlockBuilder

#block_type, #comment, #comment_pinned, #fields, #is_shadow, #mutation_attrs, #mutation_child_procs, #statements, #values, #x, #y

Instance Method Summary collapse

Methods inherited from DSL::BlockBuilder

#build_subblock, #comment_to_xml, #field, #field_to_xml, #initialize, #mutation_attr, #mutation_child, #mutations_to_xml, #set_comment, #set_position!, #shadow!, #statement, #subblock_to_xml, #tag_name, #to_xml, #value

Constructor Details

This class inherits a constructor from BlocklyInterpreter::DSL::BlockBuilder

Instance Method Details

#action(&proc) ⇒ Object



15
16
17
# File 'lib/blockly_interpreter/core_blocks/repeat_times_block.rb', line 15

def action(&proc)
  statement "DO", &proc
end

#times(&proc) ⇒ Object



11
12
13
# File 'lib/blockly_interpreter/core_blocks/repeat_times_block.rb', line 11

def times(&proc)
  value "TIMES", &proc
end