Module: Stupidedi::TransactionSets::Builder::Dsl::LoopSyntax

Included in:
LoopBodyDSL, TableBodyDSL
Defined in:
lib/stupidedi/transaction_sets/builder/dsl.rb

Overview

Syntax for DSLs in which you can define loops.

Instance Method Summary collapse

Instance Method Details

#loop_(name, repeat, &block)

Define a loop within this block. The underscore is there because "loop" is a ruby keyword.


62
63
64
65
# File 'lib/stupidedi/transaction_sets/builder/dsl.rb', line 62

def loop_(name, repeat, &block)
  body = LoopBodyDSL.new(&block).elements
  add_loop(Schema::LoopDef.build(name, repeat, *body))
end